0
Is there any better suggestion?
3 Answers
+ 2
Not necessarily better, just a different approach using another loop (for-loop)
for index, word in enumerate(words):
if index == 4:
print(word + "?", end = " ")
elif index == 8:
print(word + "!?")
else:
print(word, end = " ")