Question: Get five names from the user and store them in a file named “names.txt”
1/22/2022 9:15:32 PM
Zain Assad2 Answers
New AnswerPlease link your code. You can get the names using a loop and you'll need to know basic file operations (lessons 46-49 of Python core course)
names=[ ] for i in range(5): names.append(input ('Name:')) with open('names.txt','w') as f: f.write('\n'.join(names))
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message