Answers for "python convert to list"

7

how to convert a set to a list in python

my_set = set([1,2,3,4])
my_list = list(my_set)
print my_list
>> [1, 2, 3, 4]
Posted by: Guest on May-19-2020
1

convert generator to list python

g_to_list = list(g) # where g is a generator
Posted by: Guest on September-07-2020

Code answers related to "python convert to list"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language