0

Is this a bug? Why does print(input("msg")) Output as msg[input]? Why not just as [input] like ot appears in the lesson?

In the basic lesson about type conversion it looked like the output was just a type converted form of a numerical input; but in the playground I get the message concatinated with the input. Should print(input("msg")) always show msg in the output? It looks that way but I expected it in the popup. (it wasn't there) Even when it's type converted to a float should I ecpect it to show msg [float]? what is the code to only output the number? thank you!

1st Jun 2018, 1:53 AM
also trebeck
2 Antworten
0
if you are trying in sololearn then this problem will occur because it takes all inputs in the beginning of execution, but to cure it why just not write print(input())
1st Jun 2018, 2:23 AM
Pulkit Kamboj
Pulkit Kamboj - avatar
0
I'm trying to learn Python so I need to know what it is supposed to be. I need to know this isn't a bug but I can expect this answer everwhere Python3 runs :)
1st Jun 2018, 2:36 AM
also trebeck