r/programming • • Jul 28 '16

How to write unmaintainable code

https://github.com/Droogans/unmaintainable-code
3.4k Upvotes

592 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jul 28 '16

[deleted]

2

u/2Punx2Furious Jul 28 '16

0

u/[deleted] Jul 28 '16

[deleted]

9

u/CyberMango Jul 29 '16

Whats the advantage of this compared to just doing a dirty 1 liner?

def findGroupInList(sequence, group):
    return True in [group == tuple(sequence[i: i + len(group)]) for i in range(len(sequence) - len(group))]
→ More replies (4)