Posts

Showing posts with the label data types 2

Python3 Data types 2

Python Data types 2. PYTHON LIST : List is an ordered sequence of items. It is most used datatype in Python and more Flexible.     *  Declaring a list is, items Separated by commas( , ) are enclosed within brackets [ ].   eg:       a=[10,'hello',10.3]              print(a[1])                 #print index element                        output: 'hello'  *  Lists are mutable ,meaning ,elements in a list can be altered.     eg:     a=[21,30.3,'list']             print(a)             a[1]=3.3             print(a)            output:     [21,30.3,'list']                       [21,3.3,'list'] For more inf...