Hapus duplikat dari tuple python
my_tuple = (1, 2, 2, 5, 1, 3, 5, 3)
my_tupele = tuple(set(my_tuple))
print(my_tupele)
Sundar
my_tuple = (1, 2, 2, 5, 1, 3, 5, 3)
my_tupele = tuple(set(my_tuple))
print(my_tupele)
thistuple = ("apple", "banana", "cherry", "apple", "cherry")
print(thistuple)
{'ent1': 4, 'ent2': 3.5, 'ent3': 4.5}