Code: Select all
with open("foo.txt", "w") as f:
f.write("Life is too short, you need python")
IN PUTTY, when I run that code, it just showed to me '34'
but what I want is make 'text file'. What am I doing for solving this problem?
Code: Select all
with open("foo.txt", "w") as f:
f.write("Life is too short, you need python")
Code: Select all
import os
os.listdir('/flash')
Code: Select all
import os
with open("foo.txt", "w") as f:
f.write("Life is too short, you need python")
os.listdir('')
Code: Select all
with open("foo.txt", "w") as f:
data=f.write("Life is too short, you need python")
print(data)
os.listdir('/flash')