Created
November 30, 2019 22:39
-
-
Save ShadowofZeus/e08d0761c1037008443e283b32be3a09 to your computer and use it in GitHub Desktop.
Exercise-14: Cleaning Duplicates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clean_duplicates(sample_list): | |
cleanlist=set(sample_list) | |
print("List after duplicate cleaning:") | |
print(cleanlist) | |
def get_values(): | |
capture_list=[] | |
size_of_list=int(input("Enter a number for the list size: ")) | |
for i in range(1,size_of_list+1): # new for me!! | |
capture_var=int(input("Enter a number for your list: ")) | |
capture_list.append(capture_var) | |
print("List before cleaning:") | |
print(capture_list) | |
clean_duplicates(capture_list) | |
get_values() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment