+ 2

I can't able to give spaces between certain str.

#it is solution of symbols challenge with some small mistake. #pls help me to know my mistake. code=input() ch='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' n=' ' for decode in code: for new in ch: if decode==new: n+=decode print(n)

21st Sep 2020, 4:30 AM
Raghvendra Singh Parihar
Raghvendra Singh Parihar - avatar
8 odpowiedzi
+ 3
As I said add a space in your ch like this code=input() ch=' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' n=' ' for decode in code: for new in ch: if decode==new: n+=decode print(n)
21st Sep 2020, 4:46 AM
Ruba Kh
Ruba Kh - avatar
+ 1
Just add space in your ch string
21st Sep 2020, 4:41 AM
Ruba Kh
Ruba Kh - avatar
+ 1
No problem sometimes smallest mastakes can bring the most headache because they know how to hide 😂
21st Sep 2020, 4:51 AM
Ruba Kh
Ruba Kh - avatar
+ 1
Ruba Kh ya true😅😂😂
21st Sep 2020, 4:51 AM
Raghvendra Singh Parihar
Raghvendra Singh Parihar - avatar
0
sentence = list(input()) string = ''.join(x for x in sentence if x.isalnum() or x.isspace()) print(string) you can also try my approach
21st Sep 2020, 4:42 AM
Ruba Kh
Ruba Kh - avatar
0
Ruba Kh like when I am giving input H@#i R$#uba It returns HiRuba, instead of Hi Ruba... That's the problem
21st Sep 2020, 4:43 AM
Raghvendra Singh Parihar
Raghvendra Singh Parihar - avatar
0
Ruba Kh I think u didn't understand my question..
21st Sep 2020, 4:45 AM
Raghvendra Singh Parihar
Raghvendra Singh Parihar - avatar
0
Ruba Kh I got it✌🏻 thanks a lot😍 I am dealing with this small mistake 😅
21st Sep 2020, 4:49 AM
Raghvendra Singh Parihar
Raghvendra Singh Parihar - avatar