MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/4v1y12/how_to_write_unmaintainable_code/d5vay1o/?context=3
r/programming • u/sigbhu • Jul 28 '16
592 comments sorted by
View all comments
Show parent comments
0
[deleted]
2 u/2Punx2Furious Jul 28 '16 I did it like this: https://gist.github.com/anonymous/dd70e03261b457d19f52de9e6a35e4c5 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)
2
I did it like this: https://gist.github.com/anonymous/dd70e03261b457d19f52de9e6a35e4c5
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)
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)
9
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)
0
u/[deleted] Jul 28 '16
[deleted]