May-19-2018, 10:01 PM
Hm, although I understand your argument have a problem in applying it to my code.
This is what I wrote:
This is what I wrote:
baconFile = open('C:\\Python36\\kodovi\\bacon.txt', 'w') with open('bacon.txt', 'w') as f: f.write('hello world') baconFile.close() with open('bacon.txt', 'w') as f: f.read('hello world') content = baconFile.read() baconFile.close() print(content)and got
Error:Traceback (most recent call last):
File "C:\Python36\kodovi\files1.py", line 6, in <module>
f.read('hello world')
TypeError: integer argument expected, got 'str'