Answer the question
In order to leave comments, you need to log in
How to display input?
Hello. There is a code:
data = input('Введите данные: ')
file = input('Введите имя файла в который будут помещены данные: ')
expans = input('Введите расширение файла: ')
li = [data]
f = open(file, 'a')
f.write("\nВведённые данные: {}\n\n".format(li[0]))
f.close()
Answer the question
In order to leave comments, you need to log in
Everything works for me without changes. The file has been created, it contains your data.
Maybe you are creating the script in the wrong encoding?
It is necessary that the encoding of the script matches the encoding of the console in which it is launched.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question