NPTEL |The Joy of computing using Python | WEEK 8| Programming Assignment-1:Duplicate Elements

preview_player
Показать описание
With a given list L of integers, write a program to print this list L after removing all duplicate values with original order preserved.

Example:

If the input list is

12 24 35 24 88 120 155 88 120 155

Then the output should be

12 24 35 88 120 155

Explanation:
Third, seventh and ninth element of the list L has been removed because it was already present.

Input Format:
In one line take the elements of the list L with each element separated by a space.

Output Format:
Print the elements of the modified list in one line with each element separated by a space.

Example:

Input:
12 24 35 24

Output:
12 24 35
Рекомендации по теме
Комментарии
Автор

o=list(map(int, input().split()))
d=[]
for i in o:
if i not in d:
d.append(i)
print(*d, end="")

UltimateGamer-easycodesol
Автор

How We will give Programming Exam on Nov 3, It will be in real time and time based. How would you solve . Will You live stream...and problem given will be same to everyone or different for each student

CHAKLESH
Автор

Ty Bro Keep it up. It really helps me out :-)

vishalvastava
join shbcf.ru