Get a random boolean in python?

前端 未结 8 1106
无人共我
无人共我 2020-12-04 06:00

I am looking for the best way (fast and elegant) to get a random boolean in python (flip a coin).

For the moment I am using random.randint(0, 1) or

8条回答
提交回复
热议问题