Created
October 22, 2017 21:59
-
-
Save offby1/b360b5ec5e5a555f7f652ba9cd3bf84e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def get_locations(cell): | |
return (random.sample(cell,x), | |
random.sample(cell,x), | |
random.sample(cell,x)) | |
# or the way I'd really write it | |
def get_locations(cell): | |
return ((random.sample(cell,x)) for _ in range(3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment