How can I open a txt file in my functions 1 and 2, I am struggling | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can I open a txt file in my functions 1 and 2, I am struggling

def Find(): print("Find a player") def Best(): print("Best 5 scores") def Append(): print("Append a player") def Exit(): quit() def menu(): print() print("1...Find a player") print("2...Best 5 scores") print("3...Append a player to the file") print("4...Exit") print() selection=int(input("Enter your choice: ")) if selection==1: Find() elif selection==2: Best() elif selection==3: Append() elif selection==4: Exit() else: print() print("Invalid choice. Enter 1-4") menu() menu()

10th Mar 2022, 2:27 AM
Megan Lott
Megan Lott - avatar
2 Answers
0
Thank you so much ❣️
10th Mar 2022, 2:40 AM
Megan Lott
Megan Lott - avatar