Start på Pass 3
This commit is contained in:
14
Pass 3/files.py
Executable file
14
Pass 3/files.py
Executable file
@@ -0,0 +1,14 @@
|
||||
|
||||
file = open("log.txt","w")
|
||||
|
||||
file.write("Hej världen!!\n")
|
||||
file.write("Lite mer text")
|
||||
|
||||
file.close()
|
||||
|
||||
file = open("log.txt","r")
|
||||
print(file.read())
|
||||
|
||||
#with open("log.txt") as file:
|
||||
#data = file.read()
|
||||
#do something with data
|
||||
Reference in New Issue
Block a user