Posts by Big Nerd • 13 points
2 posts
-
0
votes1
answer897
viewsQ: Create tuples with random values
Is it possible to create a tuple with random size and values? If so, how? ex: Run -->(0, 4 , 5) Run --> (2, 1, 7, 9) Run --> (7)... If it was a list I’d use the code: from random import…
-
1
votes0
answers18
viewsQ: How does this interaction work within a list?
After searching on how to create lists with random sizes to perform some exercises I found the following line of code that satisfied my doubt but that created another x = [i + 1 for i in range…
python-3.xasked Big Nerd 13