Python Quiz set 2 List and tupple

Posted by admin at April 25, 2020

Consider the tuple tuple1=("A","B","C" ), what is the result of the following operation tuple1[-1]?

Correct! Wrong!

Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[1]:

Correct! Wrong!

Consider the tuple A=((11,12),[21,22]), that contains a tuple and list. What is the result of the following operation A[0][1]:

Correct! Wrong!

What is the result of the following operation: 'A,B,C,D'.split(',')

Correct! Wrong!

After applying the following method, L.append(['a','b']), the following list will only be one element longer.

Correct! Wrong!

What is the result of the following operation in Python: 3 + 2 * 2

Correct! Wrong!

lists are mutable

Correct! Wrong!

consider the following list : A=["hard rock",10,1.2] what will list A contain after the following command is run: del(A[1])

Correct! Wrong!

what is the syntax to clone the list A and assign the result to list B

Correct! Wrong!

what is the result of the following: len(("disco",10,1.2, "hard rock",10))

Correct! Wrong!

List and Tuples
Awesome

Comments

Write a Reply or Comment

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