Код: Выделить всё
def atm_register():
print "To register, please choose a username."
username = raw_input('> ')
with open("users.txt") as f:
f.write(username, "a")
Кстати, файл user.txt находится в том же каталоге, что и программа.
Подробнее здесь: https://stackoverflow.com/questions/340 ... or-writing
Мобильная версия