Hi, there! I'm pretty new to the programing world and I have a question.
How can I write this code so it returns to surv1.set_sex = raw_input? after the "not in sex statement"?
It's really confusing maybe I should try and write it in someother way?
I don't quite understand the while: try: catch thing... And no of my fellow students can help me around this clock and hour.
I'm counting on you. The internet such a wonderful place! :)
def sex(): surv1.set_sex = raw_input("Välj kön: ") sex = ["m","k","b"] while surv1.set_sex not in sex: print "\nAnge ett giltigt värde m (man) / k (kvinna) / b (både man och kvinna) " break