Computer Science

Which of the following statements converts a tuple into a list ?

  1. len(string)
  2. list(tuple)
  3. tup(list)
  4. dict(string)

Python List Manipulation

2 Likes

Answer

list(tuple)

Reason — In Python, the list() constructor function is used to convert iterable objects, such as tuples, into lists. The syntax list(tuple) means that we are passing a tuple as an argument to the list() function, which then creates a new list containing the elements of the tuple.

Answered By

3 Likes


Related Questions