[Solved] What can be the method to solve my problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

[Solved] What can be the method to solve my problem?

All the description of the question is in the code! https://code.sololearn.com/cm50v1rfpu99/?ref=app

16th Feb 2021, 4:24 AM
∆BH∆Y
∆BH∆Y - avatar
6 Answers
+ 3
import re print(re.findall(r'.',a))
16th Feb 2021, 4:45 AM
visph
visph - avatar
+ 2
you could use a for loop... stringname = input() x = “” for s in stringname: if s != “ “ x += s + “ “ print(x)
16th Feb 2021, 4:31 AM
Ollie Q
Ollie Q - avatar
+ 2
as Ollie Q said or you can ask them to do b=input("Please include a space between every letter ") #not for Sololearn playground
16th Feb 2021, 4:45 AM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
16th Feb 2021, 5:19 AM
∆BH∆Y
∆BH∆Y - avatar
+ 1
I almost forgot the method Shreyash[95% Inactive] said Thank you for making me revise And thanks to all of you Today I learnt new methods to make a list 😃
16th Feb 2021, 5:21 AM
∆BH∆Y
∆BH∆Y - avatar
+ 1
print(' '.join(list(a))) Or print(*list(a)) # this is, of course, as long the print functions sep=' '
16th Feb 2021, 6:16 AM
ChaoticDawg
ChaoticDawg - avatar