Add function to get unique entries in list
This commit is contained in:
parent
4e579bd07b
commit
7ea27abf3a
1 changed files with 12 additions and 1 deletions
|
|
@ -135,3 +135,14 @@ def backup_file(filename, backup_dir):
|
||||||
|
|
||||||
|
|
||||||
shutil.copy(filename, dst)
|
shutil.copy(filename, dst)
|
||||||
|
|
||||||
|
|
||||||
|
def get_unique(full_list):
|
||||||
|
|
||||||
|
unique_list = []
|
||||||
|
|
||||||
|
for entry in full_list:
|
||||||
|
if not entry in unique_list:
|
||||||
|
unique_list.append(entry)
|
||||||
|
|
||||||
|
return unique_list
|
||||||
Loading…
Add table
Add a link
Reference in a new issue