Computer Science, asked by rishithanaidu38, 5 hours ago

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 shreyababel20
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