Answer the question
In order to leave comments, you need to log in
How to display all words of a string containing an odd number of letters relative to the center of the word?
Task: given a string of characters consisting of individual words separated by a space. Output all words of a string containing an odd number of letters relative to the center of the word. All that I could write (still with an error):
a = input("Enter symbols: ").split()
b = []
for i in a:
if (len(a[i])) %2 != 0:
b.append(i)
print(b)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question