PYTHON


   LISTS AND TUPLES

A list is an ordered set of objects. Objects of one list can be of different types, they can also be lists. The list is defined by placing its elements in square brackets, separated by commas.
   Example:
   ls=[0.1,  2.0,  3,  [1.1 ,2] ]
create a list containing two quantifiable numbers, an integer and a list containing a quantifiable number and an integer.

A tuple is a list that cannot be modified. It takes up less memory and we should use it if we do not need to modify it. The tuple is defined by placing its elements separated by commas in parentheses
   kr=(0.1,  2.0,  3,  [1.1 ,2] )
The definition of a tuple must contain a comma, even if the short is to have only one element    kr=(0.1  ,)