Data types in Python:
The supported standard data types in Python include the following.
1. List.
2. Number.
3. String.
4. Dictionary.
5. Tuples.
Major difference between tuples and lists in Python
Tuples
Tuples are similar to a list, but they
are enclosed within parenthesis,
unlike the list.
The element and size can be
changed.
They cannot be updated.
They act as read-only lists.
Tuples are surrounded by ( )
Example of Tuple Code is, tup = (1,
"a", "string", 1+2)
Lists
The list is used to create a sequence.
The element and size cannot be
changed.
They can be updated.
They act as a changeable list.
Lists are surrounded by [ ]
Example of Lists Code is, L = [1, "a" ,
"string" , 1+2]