Posts

Lists

Ok! So lets talk about lists in Python. Lists is one of the type of python objects. I have talked about python classes,objects and methods here. I will just explain about it here briefly: Briefly everything in python is an object. And an object is of different type(like: list, string, float, numpy array). So list is just one of the type of python object. INITIALIZATION of a List lets initialize a variable x to a list:                                                     x = [1,"Rahul",2,"Ram",3] Note that, a list can contain different types as well(here,1 is an int while "rahul" is a string). lets take a look at list of lists:                                                 y = [["liz",1.73],["emma",2.68]] We can see...
Recent posts