+ 1

Did anyone solve "Symbols" problem on coad coach?

import string rand = input() x=rand.split() c=string.printable[10:62] storm="" for word in x: b=list(word) for letter in b: if letter in c: storm=storm+letter continue else: continue continue print(storm) This is my code , i am unable to pass test cases

7th Dec 2020, 7:30 AM
Ram Krishna Nemani
Ram Krishna Nemani - avatar
1 Antwort
+ 2
I'll give you a hint. The problem with your code is you only print strings withouth DIGITS and SPACES where the challenge says just remove the symbols (it means that only strings and DIGITS are printed) Ill give you some useful function you can use .isdigit() #if digit then true .isalpha #if character/letter then true You can also use Regular Expressions. Good Luck
7th Dec 2020, 8:22 AM
noteve
noteve - avatar