Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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