What does list() mean | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What does list() mean

20th Sep 2020, 11:22 PM
AMAR Jnr
AMAR Jnr - avatar
2 Answers
+ 9
list() converts an iterable object to list. https://python-reference.readthedocs.io/en/latest/docs/functions/list.html
20th Sep 2020, 11:41 PM
Hatsy Rei
Hatsy Rei - avatar
+ 3
As Hatsy Rei said it converts itrable object into list So here is an example : list("ayush") Output: ["a","y","u","s","h"]
21st Sep 2020, 12:24 AM
Ayush Kumar
Ayush Kumar - avatar