0
āCode Coachā problems
Hi Iām trying to solve problems from the code coach section, but the solver always tells me that the input is not iterable. Any ideas what Iām doing wrong?
5 Answers
+ 2
Are you trying to do:-
for letter in input():
...........................
...........................
+ 1
Will this help?
import string
input = input()
output= ""
for letter in input:
if letter in string.ascii_lowercase or letter in string.ascii_uppercase or letter in " ":
output = output + letter
output = output[::-1]
print(output)
+ 1
yes. thank you both!
0
Are you trying to iterate an integer?
Can you post an example.
Please include your language in your tags so people with correct skillset may assist you
0
sorry python
example:
import string
output= ""
for letter in input:
if letter in string.ascii_lowercase or letter in string.ascii_uppercase or letter in " ":
output = output + letter
output = output[::-1]
print(output)