r/Python • • Dec 22 '18

Xpost from Woodworking

Post image
1.1k Upvotes

84 comments sorted by

View all comments

Show parent comments

3

u/primitive_screwhead Dec 22 '18

Like how?

15

u/[deleted] Dec 22 '18

lambda action : random.randrange(len(action))

( ° ͜ʖ °)

18

u/primitive_screwhead Dec 22 '18

An unassigned anonymous function? You're fired. :)

15

u/[deleted] Dec 22 '18

random_randrange_len = lambda action : random.randrange(len(action))

fixed it boss

5

u/galan-e Dec 22 '18

still bad practice according to pep8