+ 4
this_is_a_normal_name = 7 123abc = 7
why this code is not working
5 Respuestas
+ 4
Because a variable name can't start with a digit.
+ 3
Umarbek Saidov
variable declaration doesn't start with number.
Already explained here
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2428/
+ 1
I don't know, why similar rule exists. I don't like googling, but one good reason could be that programming languages want to allow numbers to have characters in it.
You are atleast allowed to include characters b, e, o, x in numbers:
b: binary representation
e: 10th exponent representation
o: octal representation
x: hex representation
If you were allowed to start variables with digits, then these representations or variable usage should be changed, because how could you know whether 0b1 is a variable or an integer in binary representation?
- 3
I don , know why similar rula exists l don t like googling butone good reason could