Если я понимаю вашу проблему, я думаю, что это то, что вы ищете
guests=input("What are the names of the guests? ")
guests=guests.split(",")
other = []
for person in guests:
if person in other:
print('Welcome back, ', person)
else:
print('Welcome, ', person)
other.append(person)
Если я введу имена:
craig, smith, smith, john, sarah, vicky, jenny, john
Вывод:
Welcome, craig
Welcome, smith
Welcome back, smith
Welcome, john
Welcome, sarah
Welcome, vicky
Welcome, jenny
Welcome back, john