Tuesday, June 30, 2020

Lists in action


Example -1








Example -2



The output is same in both above examples.





Example -3




























Output is




The lists can be nested.

E.g.- myList = [1, ’a’, [“list”, 64, [0, 1], False]]

No comments:

Post a Comment