potential_passengers = ['bob','john','sue','wendy','chris','bob','jen','wendy']
accepted_passengers = set()

for name in potential_passengers:
    print('checking on {}...'.format(name))
    if name not in accepted_passengers:
        accepted_passengers.add(name)
        print('welcome aboard, {}!'.format(name))        
    else:
        print('i am sorry, we have already accepted a {}.'.format(name))
    print()        
            

HTH,
Don         
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to