sentence='ASK NOT WHAT YOUR COUNTRY CAN DO FOR YOU ASK WHAT YOU CAN DO FOR YOUR COUNTRY'
word=[]
pos=0
choice=''
while choice!='q':
print(sentence)
word=sentence.split(' ')
choice=input('what word do you want to find').upper()
for pos in range(len(word)):
if choice==word[pos]:
print('The word ' + str(choice)+ ' occurs in the ' + str(pos +1) + ' th position ')
if choice not in word:
print("not valid word")
So, I have got this code that prints the words location in my array but lets say the word is in the zero position e.g Ask I want it to come up with the word ASK occurs in the 1st position instead of the word ASK occurs in the th position, and so on e.g nd,rd and th. Any help would be appreciated!