convert set to list python time complexity method 4

27

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

# Using dict.fromkeys() method
x = list(dict.fromkeys(a))
converted_set = set(x)
print(converted_set)

Comments

Submit
0 Comments