Python Forum

Full Version: How to get a random item from a list, print it and delete it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,
I have a question
Is there a way to get a random item from a list, print it and then delete the same random item from the list??
Yes, look at the random module and list methods.
(Feb-22-2019, 04:56 PM)Yoriz Wrote: [ -> ]Yes, look at the random module and list methods.
i am not sure that i can find it
Look in the python documentation.