+ 1

The Spy Life

str = input().split(" ") s = "" for i in str: if i.isalpha()== 1: s += i else: pass print(s[::-1]) What's the mistake??

17th May 2020, 9:11 AM
Vignesh
Vignesh - avatar
2 Respuestas
+ 3
Vignesh D , you should also include in the if check if the letter is whitespace, remove the "== 1"part. Look at the correct code. Hope it helps you 🐱. https://code.sololearn.com/crd9NplyC678/?ref=app
17th May 2020, 9:25 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
TheWh¡teCat 🇧🇬 thank you mate it works
17th May 2020, 9:30 AM
Vignesh
Vignesh - avatar