0
Hello to everyone. How can I get the output {} if an empty string is entered
Description in code. Please help.My brain is already burning.I did part of the task, but this part cannot be mastered in any way https://code.sololearn.com/c1M89nO9p3kO/?ref=app
7 Respostas
+ 3
remove comma first and split..
words = input().replace(',',"").split()
+ 4
Михаил Don't think like that. It happens when you learn.
+ 3
Михаил You can also do like this if you forgot to use replace.
words = input()
if words != '':
words = words.split(', ')
+ 2
Михаил in programming, you have to experience all things like this to get better programmer. (No need ashamed, Ofcouse in any matter, unless if it is intential mistake)..
You're welcome...
+ 2
Jayakrishna🇮🇳 ,AJ Anant Thanks for the kind words
0
Jayakrishna🇮🇳 thanks. How could I forget about replace. I am ashamed
0
AJ Anant I feel dumb myself