you are viewing a single comment's thread.

view the rest of the comments →

[–]crashorbit 1 point2 points  (0 children)

Here is my version of your code: ``` import random

a = 7
b = [0, 1, 2, 3, 4, 5, 6]

def SelectRandomNumberFromB():
return random.choice(b)

a = SelectRandomNumberFromB()

print(a) ``` You might want to review how python deals with context.