SubhanUllah Posted September 27, 2022 Report Posted September 27, 2022 a_list = [1, 2, 3, 2, 3, 4] con = set(a_list) list_without_duplicates = list(con) # or more simple list_without_duplicates = list(set([1, 2, 3, 2, 3, 4])) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.