+ 2

[Solved] Why does line 5 return a syntax error?

https://code.sololearn.com/cq87feOnRaz2/?ref=app

8th Oct 2020, 12:12 PM
Adam Stork
Adam Stork - avatar
6 Respuestas
+ 2
There is some invalid character between randrange arguments ,using backspace and then adding space again works fine
8th Oct 2020, 12:19 PM
Abhay
Abhay - avatar
+ 3
Abhay The numbers were written by me but it's possible there was some hidden character in the bracket. Because the function was indeed copy pasted, as you say. Still, weird. :D
8th Oct 2020, 12:30 PM
Adam Stork
Adam Stork - avatar
+ 2
Abhay You're right, replacing them with fresh new values works. No idea how an invalid character got there or what it even was. So weird. Thanks!
8th Oct 2020, 12:23 PM
Adam Stork
Adam Stork - avatar
+ 2
Abhay Interesting. It's true, they weren't plain text. Now I'll know what to look for in the future. Thank you!
8th Oct 2020, 12:45 PM
Adam Stork
Adam Stork - avatar
+ 1
Adam Stork usually when people copy paste it from somewhere else you get them
8th Oct 2020, 12:24 PM
Abhay
Abhay - avatar
+ 1
Adam Stork here is a link I found which might answer why is it so ,check the first answer https://www.quora.com/How-do-I-solve-invalid-character-in-identifier-in-JUMP_LINK__&&__Python__&&__JUMP_LINK
8th Oct 2020, 12:41 PM
Abhay
Abhay - avatar