Converting Python Object into List


list() is used to convert python objects into list.

Syntax :
 list(<iterable_python_object>)
Example :
 
L1="inspire"
print(list(L1))

L2=[10,20,30]
print(list(L2))

L3={"A":10, "b":20}
print(list(L3))
Output :
['i', 'n', 's', 'p', 'i', 'r', 'e']
[10, 20, 30]
['A', 'b']