python - remove duplicate items from the list
mylist = ["a", "b", "a", "c", "c"]
mylist = list(dict.fromkeys(mylist))
python - remove duplicate items from the list
mylist = ["a", "b", "a", "c", "c"]
mylist = list(dict.fromkeys(mylist))
python set remove duplicate elements
new_menu = ['Hawaiian', 'Margherita', 'Mushroom', 'Prosciutto', 'Meat Feast', 'Hawaiian', 'Bacon', 'Black Olive Special', 'Sausage', 'Sausage']
final_new_menu = list(set(new_menu))
print(final_new_men)
#output = ['Hawaiian', 'Margherita', 'Mushroom', 'Prosciutto', 'Meat Feast', 'Bacon', 'Black Olive Special', 'Sausage']
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us