I have an assignment were we're supposed to write a script for pig latin, I have the base done but I need to detect so that it doesn't contain a number or are several words
I've tried a lot of if statements and other things, none have worked this far.
word1 = input("Write a word in English: ")
siffra = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
for x in siffra:
if x in word1 or word1.count(" "):
print("Bara ett ord och inga siffor!")
break
else:
pig = word1[1:] + word1[0] + "ay"
print(pig.lower())
break
I want it to say "Bara ett ord och inga siffror" when there is a number in word1. But now it only says that when there is a 1 in word1.