Python - Random Choice - How to Pick a Random Element With One Line of Code

preview_player
Показать описание
#Shorts #Python
We may often want to get a random item from a collection of elements. Python excels at this because we don't have to implement anything from scratch and just use the built-in "choice" function in the "random" module.
The result? It only takes us ONE LINE to pick a random item!

-------------------------------------------------------------------------------------
Links:
Рекомендации по теме