Skip to main content
beginner_python's user avatar
beginner_python's user avatar
beginner_python's user avatar
beginner_python
  • Member for 5 years, 1 month
  • Last seen more than 2 years ago
asked
Loading…
awarded
comment
Basic While loop problem when changing variable value - python
thanks, could you give an example of how you would code it?
Loading…
comment
why does my list keep changing after using for loop to append?
that's my problem though, the list and number of combinations are too large to make a close ended list (using product function) to iterate through one by one. in my example there are 49 elements in the list and 6 combinations (with replacement ), meaning a list of 13bn. If i want to expand the list or increase the combinations this gets even worse, hence why am wanting to use random function, to take a sample from the range of possible combinations. If there is no way of using random function then I guess I have no way of solving my problem then.
comment
why does my list keep changing after using for loop to append?
I don't see what's so unclear. If you copy in the function and run it a few times you will see that the generated values change every time you run it. I want to keep what is generated the first time around so i can use the values elsewhere. Would you have any ideas on how to do that?
comment
why does my list keep changing after using for loop to append?
doesn't answer my question. what does the use of random have to do with the stored values getting wiped and replaced with new ones every time its run?
comment
why does my list keep changing after using for loop to append?
I just want to store what was randomly generated in a list, for use elsewhere. There's surely a way to do that?
Loading…
1 2
3