Wednesday, 17 December 2025

81 - Class 11 Computer Science with Python Practical File

Program: 81: Write a Python program to create NewList which contains all the values of original list after removing duplicate values. Also display the NewList.



OriginalList = [10, 20, 30, 20, 40, 10, 50, 30]

NewList = []

for item in OriginalList:

    if item not in NewList:

        NewList.append(item)

print("NewList:", NewList)


Output:


NewList: [10, 20, 30, 40, 50]

No comments:

Post a Comment