"""10-3. Guest: Write a program that prompts the user for their name. When they respond, write their name to a file called guest.txt.""" filename2 = "../Data/guest.txt" with open(filename2, "w") as guest_info: filename = input(str(guest_info)) for info in guest_info: print(f"name: {info}") I already created empty txt file. I need to let user fill with info. How would you solve this?
10-3. Guest: Write a program that prompts the user for their name. When they respond, write their name to a file called guest.txt.""" filename2 = "../Data/guest.txt" with open(filename2, "w") as guest_info: filename = input(str(guest_info)) for info in guest_info: print(f"name: {info}") I was expecting, that input would work but it says it isn't readable.