¡@

Home 

python Programming Glossary: mylistoflists

Python: Determine if an unsorted list is contained in a 'list of lists', regardless of the order to the elements

http://stackoverflow.com/questions/20055321/python-determine-if-an-unsorted-list-is-contained-in-a-list-of-lists-regardl

an unsorted list list1 is contained in a 'list of lists' myListOfLists regardless of the order to the elements in list1 My attempt.. doSomething ... which I call many times def doSomething myListOfLists otherInputs list1 ... # do something here with `otherInputs'.. gives `list1' some values # now only append `list1' to `myListOfLists' if it doesn't already exist # and if it does exist remove it..