My code:
boyka = "hello"
f = open("~/Desktop/" + boyka + ".txt", "a")
f.write(boyka)
f.close
result:
IOError: [Errno 2] No such file or directory: '~/Desktop/hello.txt'
Shouldn't the script create the file since it's "a" ? How can I fix the code?
I'm using Ubuntu.