Discussions Events Study Material Jobs
Remove Duplicates from a List using Python - Uniwaly

Explore Diverse Conversations

Remove Duplicates from a List using Python

Posted By: UmairMehmood Published On: 13 June 2025 At: 12:26 PM

Input a list with repeated values and create a new list with unique values only (without using set())
original_list = [2, 4, 2, 6, 4, 8, 10, 6, 10, 12]
unique_list = []
for item in original_list:
    if item not in unique_list:
        unique_list.append(item)

print("Original list:", original_list)
print("List with unique values:", unique_list)


Tags:

python duplicate list python python code
Login to like

Posted By:

Author Profile

UmairMehmood

11 days ago

Join the conversation!

Login to Comment

Discover More Articles

وزارت قانون و انصاف حکومت پاکستان میں شاندار نوکریاں

Divisional Manager - The Urban Unit Jobs 2025

Loopholes in Pakistani Law and Strategies for Improvement

پاکستانی ڈاکٹر کو کینیڈا کے بڑے سول اعزاز 'آرڈر آف کینیڈا "سے نواز دیا گیا

How to Keep a Camera Stream Active Across Pages Without Reinitializing the Camera on Each Page?

Understanding the HTML Boilerplate: A Comprehensive Guide to the Basics of Web Development

Critically discuss Quality and Access as to two problems in higher education. Suggest some ways to address these problems.

Sort a List Manual Bubble Sort using Loops in Python

Pakistan Television Corporation ( PTV ) New Jobs 2025

The Process of Arresting a Pakistani Citizen under Pakistani Law