Python Variable Names Flashcards
1
Q
A variable name must start with:
A
A letter or the underscore character
2
Q
A variable name cannot start with:
A
A number
3
Q
A variable name can only contain:
A
Alpha-numeric characters and underscores
4
Q
True or False: variable names are not case-sensitive
A
False
5
Q
How do you separate words in a variable name?
A
The underscore character
6
Q
How do you assign multiple values to multiple variables in one line?
A
a, b, c = “Yes”, “No”, “Maybe”
7
Q
True or False: you can assign the same value to multiple variables
A
True
8
Q
How do you unpack a collection of values into variables?
A
fruits = [“apple”, “banana”, “cherry”]
x, y, z = fruits