0
Is there an alternative module for Python 'random' library..Also i'm getting an error while using random.choice keyword. error i
This is how i imported random module : from random import choice,choices,random,randint Error i got : playsound.playsound(random.choice(beatboxes)) AttributeError: 'builtin_function_or_method' object has no attribute 'choice'
2 Respostas
+ 4
if you import specific methods from a library, you can only access the specific methods you imported.
If you want the code to work:
- either just use, import random
- or lose the "random." before "choice"
+ 1
No prob guys.. the problem is solved now