Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- UserInputList = []
- def main2(List, Options):
- Addmore = True
- count = 1
- while Addmore:
- count = 1
- while len(List) < 8:
- string = input("Please enter word number " + str(count) + ": ")
- try:
- teststr = str(string)
- if teststr.isdigit():
- print("Please enter a string: ")
- else:
- List.append(string)
- count += 1
- except ValueError:
- print("Please enter a valid string: ")
- again = str(input("Do you want to add another word? Type Yes or No:"))
- if again == "No" or "no":
- Addmore = False
- elif again == "Yes" or "yes":
- Addmore == True
- else:
- again
- print(List)
- main2(UserInputList, InputOptions)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement