n Python which of the following is a mutable object a string

n Python, which of the following is a mutable object? a string a tuple O a list all of the above O none of the above

Solution

Q. In Python, which of the followint is a mutable object?

Ans. a list is correct answer; string and tuple are mutable

Q. Which of the following doesn\'t cause an exception?

Ans. for loop -- option c

option a - trying to access out of bound

option b - trying to access with a non existent key

option d -- it tries to convert a string a base 10

Q. Assume the statement n[1024] = 3 does not produce an error message. This implies

A. Option D as

 n Python, which of the following is a mutable object? a string a tuple O a list all of the above O none of the above SolutionQ. In Python, which of the followi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site