Search
Submit a request
Sign in
How can we help you today?
Categories
Submit a request
Submit a request
Sign in
Support
Community
SQL Data Generator
How to select a random number from a List
New post
I tried using random.choice() but didnt work I got the below error
Error: AttributeError : 'Random' object has no attribute 'choice'
shravan
September 04, 2018 11:18
-
0
+
Comments
2 comments
Sort by
Date
Votes
Here is my code:
__randomize__ = False
import System
from System import Random
random = Random()
month=[12,34,56,78]
def main(config):
return random.choice(month)
shravan
September 04, 2018 11:19
-
0
+
Hi @shravan
Can you share a screenshot of the error where I can see other setting as well?
Tianjiao_Li
September 05, 2018 15:54
-
0
+
Add comment
Please
sign in
to leave a comment.
Error: AttributeError : 'Random' object has no attribute 'choice'