Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created March 7, 2013 11:23
Show Gist options
  • Save wwgist/5107404 to your computer and use it in GitHub Desktop.
Save wwgist/5107404 to your computer and use it in GitHub Desktop.
PYTHON: check list on unique items
start_list = [1,2,3,3,4,1]
set(start_list)
# возвращает set([1,2,3,4])
if len(start_list) == len(set(start_list)):
print 'List is unique!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment