Did anyone solve "Symbols" problem on coad coach? | Sololearn: Learn to code for FREE!


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

12/7/2020 7:30:03 AM

Ram Krishna Nemani

1 Answer

New Answer


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