Answer:
Check the explanation
Step-by-step explanation:
def argLongest(L):
index = -1
for i in range(len(L)):
s = L[i]
if len(s) % 2 == 0 and s.endswith('ing'):
if index == -1 or len(s) > len(L[index]):
index = i
return index
print(argLongest(['living', 'checking', 'hello how are you?']))
print(argLongest(['living', 'hello how are you?', 'flying']))
print(argLongest(['hello how are you?']))
The output can be seen in the attached image below
1 Process finished with exit code 0