This information is taken from our textbook Think Python so i recommend to read it and if you want to reforce and improve do the exercises provided by the textbook so you can understand better.

So, to start we need to learn that Python works with values but there are differents types of value like:

Strings: because it contains a “strings” of letters. It basically it takes everything literal it doesnt matter if you write a number if it has ” .. ” the program wil consider it as a string.

Integrers: are basically numerical values, like 2,4,5,3,6, etc. but whole and can go from negative to positive it doesnt matter.

Float: they represent real numbers and are written with a decimal point dividing the integer and fractional parts. Like; 3.2, 5.4, 7.87, etc.

Tuples: A tuple is a sequence of values. The values can be any type, and they are indexed by integers, so in that respect tuples are a lot like lists. The important difference is that tuples
are immutable.

Syntactically, a tuple is a comma-separated list of values:
>>> t = ‘a’, ‘b’, ‘c’, ‘d’, ‘e’
Although it is not necessary, it is common to enclose tuples in parentheses:
>>> t = (‘a’, ‘b’, ‘c’, ‘d’, ‘e’)
To create a tuple with a single element, you have to include a final comma:
>>> t1 = ‘a’,
>>> type(t1)
<type ‘tuple’>
A value in parentheses is not a tuple because it will get confused with a string (thats why is marked like type str):
>>> t2 = (‘a’)
>>> type(t2)
<type ‘str’>

List: A list is a sequence of values. In a list, the values can be any type. The values in a list are called elements or sometimes items. There are several ways to create a new list; the simplest is to enclose the elements in square brackets ([ and ]).

Dictionaries: A dictionary is like a list, but more general. In a list, the indices have to be integers; in a dictionary they can be (almost) any type.

Boolean: A boolean expression is an expression that is either true or false. True and False are special values that belong to the type bool; they are not strings.

CC BY 4.0 Mastery 9 – Basic Types of Python by ilkaeng is licensed under a Creative Commons Attribution 4.0 International License.