Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert set to list python time complexity method 2

# sample_list is defined list
sample_list = [1,2,3,'seeker',3,7.5]

# set() to convert list to set
sample_set = set() # defining set
#using for loop
for i in sample_list:
    #adding i to b
    sample_set.add(i)
print(sample_set)
 
PREVIOUS NEXT
Tagged: #convert #set #list #python #time #complexity #method
ADD COMMENT
Topic
Name
1+8 =