- 3
file=open('num.txt', 'w') name=[] for i in range(5): n=input("Enter Name: ") file.writelines(name) name.append(n+'\n') file
Kaya ho ga iss me
2 Answers
+ 5
Gunda Freefire ,
3 issues to fix:
> code / code block that should run in the for loop has to be indented
> writelines() should be outside / after of the loop
> last line should close the file
+ 1
Karna kya hai? Complete code kaha hai?