Skip to content

Instantly share code, notes, and snippets.

@mutaku
Created August 9, 2012 16:53
Show Gist options
  • Save mutaku/3305832 to your computer and use it in GitHub Desktop.
Save mutaku/3305832 to your computer and use it in GitHub Desktop.
make sure all sublists are only one element
def checkpossibility(unsatlist):
if len(sorted(unsatlist, key=len, reverse=True)[0]) > 1:
return False
else:
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment