Python values
A number such as 3 and a string such as "Maya" show how Python represents different kinds of information.
Iris peeks at the sample data behind an event app. Her ticket count is written as 3, but her name is written as "Iris". Why does her name get quotation marks when the count doesn't?
3 minutes. No sign-up needed.
What you'll learn4 ideas
- A value is one piece of information Python works with, like Iris's ticket count 3.
- Number values like 3 or 4.5 are written with no quotation marks, and they can have a decimal point.
- Quotation marks make a value text, called a string, even when it holds digits like "3".
- A string can use matching single or double quotes, and the quotes only mark where the text starts and ends.