words_list = [[O,N,E],[T,W,O],[T,H,R,E,E]...]
inputted_word = input()
def get_answer():
word_is_digit_word = False
i = 0
for digit_word in words_list:
order_iter = 0
for letter in inputted_word:
if letter == digit_word[order_iter]:
if order_iter < len(digit_word):
order_iter += 1
else:
word_is_digit_word = True
return word_is_digit_word, i
i += 1
return word_is_digit_word, i
word_is_digit_word, i = get_answer()
print('was it a digit word?: ', word_is_digit_word)
if word_is_digit_word:
print('which word was it?: , words_list)
Last reply 19 minutes ago
Official: University of Bristol A100 2024 Entry ApplicantsLast reply 47 minutes ago
2023 ** Borders and Enforcement, Crime & Compliance - ICE - Immigration OfficersLast reply 1 hour ago
Official University of Edinburgh Applicant Thread for 2024Last reply 1 hour ago
Official University College London Applicant Thread for 2024Last reply 1 hour ago
Can I do economics degree without a level maths?Last reply 1 hour ago
BAE systems degree apprenticeships September 2024Last reply 1 hour ago
Government Social Research Placement interview questionsLast reply 2 hours ago
Official University of St Andrews Applicant Thread for 2024Last reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 2 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 3 weeks ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 5 months ago
AQA GCSE Computer Science Paper 1 (8525/1A, 1B, 1C) - 19th May 2023 [Exam Chat]Last reply 5 months ago
AQA Computer Science NEA and Computer science paper 1 questionLast reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 2 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 3 weeks ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 5 months ago
AQA GCSE Computer Science Paper 1 (8525/1A, 1B, 1C) - 19th May 2023 [Exam Chat]Last reply 5 months ago
AQA Computer Science NEA and Computer science paper 1 question