Writing to a file
f.write("hi")
- write the string, no returns unless included with string
f.writeline()
- provide a list of strings to write to the file, no returns unless included in strings of list
with open('somefile', 'w') as filea:
filea.write('hello world')
filea.write(', time for quiz 5')
somefile content:
hello world, time for quiz 5