im floating here why cant we use - | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

im floating here why cant we use -

variables

30th Sep 2016, 7:41 AM
Ian Maranga
Ian Maranga - avatar
3 Answers
+ 1
Amarie describes what you can/can't do which may be all you need. The simplest answer 'why' is "because". A longer answer is "because Python's author said so" or "because - means 'subtract'". Some languages allow it, some don't and some can even be changed; it's just the syntax. Another explanation: http://stackoverflow.com/a/2064358
30th Sep 2016, 3:44 PM
Kirk Schafer
Kirk Schafer - avatar
0
The character '-' is not allowed to use in variable names! Allowed are only letters, numbers and underscores '_' and it is not allowed to start the name with a number or an underscore.
30th Sep 2016, 8:57 AM
Amarie
- 2
yo mom
30th Sep 2016, 9:58 AM
thomasjm