+ 1
Solved. Quesitos whats wrong in my Code?
Whats wrong in my Code? The Output Should be 4 times different lottery Numbers and Not 4 time the Same. https://code.sololearn.com/cfw245R3Pd5M/?ref=app
3 Answers
+ 3
Put num = [] line inside function .
+ 3
After first function call your num list gets filled with 6 random int . so for 2nd,3rd,4th call the while loop doesn't run so num is returned same as first function call.
When you declare num = [] inside function. Everytime the function is called num list is filled with 6 random int.
+ 1
Many thanks . Now its works as expected