Guess whose gonna pay

عاشق الابداع - Oct 31 - - Dev Community

import random
print("Welcome to 'whose wallet ?'")
name = input("""You will give me a list of names, and I will pick a person to pay
If you're ready, enter the names separated by a comma: \n """)
if name:
choice = name.split(",")
which_one = random.randint(0,len(choice)-1)
else:
print("You should add a list")
print(f"Please ask {choice[which_one]} to take his wallet out, Dinner is on him")

. . .