Which of the following is NOT a valid variable name in Python?
1.
_value = 100
2.
1_num = "1 num"
3.
name_ = "John"
4.
COOL = "cool"
Answer: 2
1_num = "1 num"
This is because we cannot begin a variable name with numbers. Here is the complete list of naming rules for Python variables.
value, name and COOL are valid because they contain alphabets and underscore, and don’t begin with a number.