A variable in Python is a named location in memory that stores a value.
The variable name must start with a letter or an underscore, which can contain letters, numbers, and underscores. Variable names are case-sensitive, so name and NAME are two different variables.
Lists: A sequence of values, enclosed in square brackets. The values in a list can be of any data type. Ex. are List[1, 2, 3], ['a', 'b', 'c'], [True, False, None].
smr = list(("apple", "banana", "cherry"))
Tuples: A sequence of values, enclosed in parentheses. The values in a tuple cannot be changed. Examples are (1, 2, 3), ('a', 'b', 'c'), (True, False, None).
smr = tuple(("apple", "banana", "cherry"))
Dictionaries: A collection of key-value pairs, enclosed in curly braces. The keys must be unique, but the values can be of any data type. Examples are {'name': 'John Doe', 'age': 30}, {'fruits': ['apple', 'banana', 'orange']}.
smr = dictionaries{'name': 'John Doe', 'age': 30}
Note:
This tutorial may have been created with the assistance of artificial intelligence (AI) tools. Some of the research data used to write this tutorial may have been derived by AI tools, and then put together by humans. Additionally, AI tools may have been used to write some or all of the tutorial.