You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from os import remove
defmain():
name ="some_file.txt"withopen(name, "w") as f:
f.write("new contents 🔥")
withopen(name, "r") as f:
contents = f.read()
print(contents)
withopen(name, "a") as f:
f.write("add another fire 🔥")
withopen(name, "r") as f:
contents = f.read()
print(contents)
remove(name)
Bug description
File open does not have the append flag.
Steps to reproduce
This works in python but doesn't in Mojo
This is a compiler issue :
System information
The text was updated successfully, but these errors were encountered: