Oct-23-2019, 01:55 PM
(Oct-23-2019, 01:42 PM)ichabod801 Wrote: Define "doesn't work." I'm not sure what the parameter to the function call is supposed to be, as you write over whatever it is on line 10. But if you pass something as a parameter, it works for me. Note that it is printing out the list before dupes are removed, and returning the list with dupes removed. So it may look wrong, but if you check the return value it's correct.
When I added this above function and compiled my code :
list_input = input() print(create_set(list_input))Didn't show me nothing as if it didn't read my script.
This is my all code:
def create_set(list_create): user_input = input("Insert elements: ") list_create = list(map(int,user_input.split(','))) print(list_create) return list(set(list_create)) list_input = input() print(create_set(list_input))