Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Python Lists

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 490
    Comment on it

    The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Important thing about a list is that items in a list need not be of the same type.For example you can see below code.

    list1 = ['physics', 'chemistry', 1997, 2000];
    list2 = [1, 2, 3, 4, 5 ];
    list3 = ["a", "b", "c", "d"]

    Note-Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: