displayStrs.py
def display_strs(strings, outFile=None):
    """Print the List of strings to the terminal; optionally to outFile."""
 
    # Print the List of strings to the terminal window
    for outStr in strings:
        print(outStr, end='')
    print()

    # If an outFile is passed, open it and write the strings to it
    if outFile != None:
        try:
            # Open the output file and write the strings to it
            with open(outFile, 'w') as outFile:
                for outStr in strings:
                    outFile.write(outStr)
        except:
            print(f"\nOutput file could not be opened: {outFile}")
Print the List of strings to the terminal; optionally to outFile.
Print the List of strings to the terminal; optionally to outFile.
Print the List of strings to the terminal ; optionally to outFile .
def display_strs(strings, outFile=None):
    for outStr in strings:
        print(outStr, end='')
    print()
    if outFile != None:
        try:
            with open(outFile, 'w') as outFile:
                for outStr in strings:
                    outFile.write(outStr)
        except:
            print(f"\nOutput file could not be opened: {outFile}")
def display_strs ( strings , outFile = None ) : for outStr in strings : print ( outStr , end = '' ) print ( ) if outFile != None : try : with open ( outFile , 'w' ) as outFile : for outStr in strings : outFile . write ( outStr ) except : print ( f"\nOutput file could not be opened: {outFile}" )
Print the List of strings to the terminal; optionally to outFile.
Print the List of strings to the terminal ; optionally to outFile .
"""Print the List of strings to the terminal; optionally to outFile.""" # Print the List of strings to the terminal window # If an outFile is passed, open it and write the strings to it # Open the output file and write the strings to it
strings
outFile