The beginning or the end?

Report a typo

Read the input, find the starting index of the substring old, then search backward from the end of the string for the same substring, and print the bigger value of the two.

Sample Input 1:

old macdonald had an old farm

Sample Output 1:

21
Write a program in Python 3





___

Create a free account to access the full topic