How many elements will the list1 list contain after execution of the following snippet?

How many elements will the list1 list contain after execution of the following snippet?

A. two
B. zero
C. one
D. three

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “How many elements will the list1 list contain after execution of the following snippet?

  1. #How many elements will the list1 list contain after execution of the following snippet?
    List1 = “don’t think twice, do it!”.split(‘,’)

    #Explanation:
    #example1
    List1 = “don’t think twice, do it!”.split(‘,’)
    print(List1)
    #result: [“don’t think twice”, ‘ do it!’]

    #example2
    List1 = “don’t think twice, do it!”.split(‘*’)
    print(List1)
    #result: [“don’t think twice, do it!”]

    # #example3
    List1 = “don’t think twice, do it!”.split(‘t’)
    print(List1)
    #result: [“don'”, ‘ ‘, ‘hink ‘, ‘wice, do i’, ‘!’]

    The correct answer is A

  2. got this result [ ‘dont think twice’, ‘ do it’ ] , so it’s two elements. The correct answer is A.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.