Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert set to list python time complexity

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

# set() to convert list to set
sample_set  = set(sample_list)
print(sample_set) #printing set


# Output:
# {1, 2, 3, 7.5, ‘seeker’}

# Time of execution 0.00016019
 
PREVIOUS NEXT
Tagged: #convert #set #list #python #time #complexity
ADD COMMENT
Topic
Name
5+2 =