In: Computer Science
def read_list():
"""
This function should ask the user for a series of integer values (until the user enters 0 to stop) and store all those values in a list. That list should then be returned by this function.
"""
def remove_duplicates(num_list):
"""
This function is passed a list of integers and returns a new list with all duplicate values from the original list remove.
>>> remove_duplicates([1, 2, 3, 2, 3, 4])
[1, 2, 3, 4]
>>> remove_duplicates([1, 1, 1])
[1]
>>> remove_duplicates([])
[]
"""
def main():
num_list = read_list()
print("Original list entered by user: ")
print(num_list)
no_duplicates = remove_duplicates(num_list)
print("List with duplicates removed: ")
print(no_duplicates)
def read_list():
num_list=[] #list to store the inputted
integers
print("Enter a series of integers and 0 to stop:
")
while True:
n=int(input()) #taking
the input from the user
if(n==0): #checking if
0 is entered or not
break #if 0 is entered stop asking input
num_list.append(n) #if
any non zero is entered then add to the list
return num_list #return the input list
def remove_duplicates(num_list):
no_duplicates=[] #list to store unique
values
for i in num_list: #looping over all the
elements in the list
if i not in
no_duplicates: #if the element is not found in the
no_dupilcates list
no_duplicates.append(i) #adding the element to the
no_duplicates list
return no_duplicates #returning the no_duplicates list
def main():
num_list=read_list()
print("Original list entered by user: ")
print(num_list)
no_duplicates=remove_duplicates(num_list)
print("List with duplicates removed: ")
print(no_duplicates)
main()


Please give a like