첫번째 방법
# Split string method
names_string = input("Give me everybody's names, separated by a comma. ")
names = names_string.split(", ")
import random
random_int = random.randint(0, len(names)-1)
person = names[random_int]
print(person + " is going to buy the meal today!")
두번째 방법
import random
person = random.choice(names)
print(person + " is going to buy the meal today!")