1

I want to work module random,choice in python so i entered code written the book but it dosent work i want see print random number

i don't know why it dosen't work i entered as it is saw book and i dont enter any ohter code

i am beginner python,english sorry

1
  • written in which book? Commented Dec 11, 2019 at 4:05

1 Answer 1

2

You should pass in a list ([]) rather than a set ({}) for random.choice function as the argument requirement:

random.choice([1,2,3,4,5,6])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.