Skip to main content
meto's user avatar
meto's user avatar
meto's user avatar
meto
  • Member for 10 years, 2 months
  • Last seen more than a month ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
accepted
comment
Merge two list and discarding duplicates
Then I must be wrong. I seem to remember that in a talk (I think by Raymond Hettinger) deques were said to be faster. Thanks for checking!
awarded
comment
Merge two list and discarding duplicates
regarding the deque: it seems that they should be faster than regular lists even if used only to append on the right: docs.python.org/3/library/collections.html#collections.deque
awarded
asked
Loading…
accepted
comment
Find co-occurrence of elements
This is interesting, especially for the use of the nested defaultdics. I wonder if we could avoid using permutations and use combinations instead to cut in half the innermost loop (by adding the appropriate extra assignment for result)
comment
Find co-occurrence of elements
Thanks for the comments. I was more concerned with the actual algorithm rather that the naming. which I agree, I should change and improve
revised
Find co-occurrence of elements
added 158 characters in body
Loading…
asked
Loading…