Last active
October 24, 2017 18:37
-
-
Save kai5263499/4c00c79a9094f9b643ad to your computer and use it in GitHub Desktop.
generate a random array
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
from random import randrange | |
from random import randint | |
def intArray(maxrand=100,randomValues=False): | |
l=randrange(maxrand) | |
o=[] | |
for i in range(1,l): | |
if(randomValues): | |
o.append(randrange(maxrand)) | |
else: | |
o.append(i) | |
return o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment