Write a Python program to remove duplicates from a list.
3
Sort the elements in ascending order while displaying the output.
Note:
Inputs are of string data type
5
6
7
s
Input format
First line of the input consists of number of elements(n) in the list
Next n lines contain elements present in the list.
Output format
Output displays the list of elements without duplicates sorted in
ascending order
Answers
Answered by
0
Answer:
def Remove(duplicate):
final_list = [ ]
for num in duplicate:
if num not in final_list:
final_list.append(num)
return final_list
duplicate = [2, 4, 10, 20, 5, 2, 20, 4]
print(Remove(duplicate))
Explanation:
Similar questions
Math,
15 days ago
Physics,
15 days ago
Social Sciences,
15 days ago
Biology,
1 month ago
Computer Science,
1 month ago
English,
9 months ago
Math,
9 months ago