Hi Again All,

I had a couple questions about my program:

def CollectNames():
    
    answer_set=set([])
    sorted_list = sorted(answer_set)
    word=raw_input("Name #1: ")

    word=raw_input("Name #2: ")
    
    word=raw_input("Name #3: ")

    word=raw_input("Name #4: ")

    word=raw_input("Name #5: ") 
    
    print "Your answer's sorted: ", ','.join(sorted_list)

CollectNames()


1.) how do i add each answer given to the list so it is printed at the end? 
2.) also im trying to modify the program so if the user puts in the same name, 
it will give an make them try again until they have 5 completely different 
names.


Thanks,

JT
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to