I'm novice in python and got a problem in which I would appreciate some help. The problem in short:
- ask for a string
- check if all letter in a predefined list
- if any letter is not in the list then ask for a new string, otherwise go to next step
- ask for a second string
- check again whether the second string's letters in the list
- if any letter is not in the list then start over with asking for a new FIRST string
basicly my main question is how to go back to a previous part of my program, and it would also help if someone would write me the base of this code. It start like this:
list1=[a,b,c,d]
string1=raw_input("first:")
for i in string1:
if i not in list1:
Thanks
list1=['a','b','c','d']in your code.