Question

    Predict the output

    list1 = ['physics', 'chemistry', 1997, 2000]

    list2 = [1, 2, 3, 4, 5, 6, 7 ]

    print "list1[0]: ", list1[0]         

    A list1[1]: physics Correct Answer Incorrect Answer
    B list1[0]: physics Correct Answer Incorrect Answer
    C list1[2]: physics Correct Answer Incorrect Answer
    D None Correct Answer Incorrect Answer
    E All of these Correct Answer Incorrect Answer

    Solution

    list1[0] refers to the first element in list1, which is 'physics', the output will be: list1[0]:  physics

    Practice Next