Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to get a random item from a list, print it and delete it?
#1
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??
Quote
#2
Yes, look at the random module and list methods.
Quote
#3
(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
Quote
#4
Look in the python documentation.
buran likes this post
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  If item in list = true, Output = xx kroh 0 77 Feb-19-2020, 09:17 AM
Last Post: kroh
  printing a list contents without brackets in a print statement paracelx 1 115 Feb-15-2020, 02:15 AM
Last Post: Larz60+
  output a list of random numbers 'x' columns wide adityavpratap 4 112 Jan-13-2020, 05:32 PM
Last Post: perfringo
  Add list item into executable command zhome888 2 202 Dec-19-2019, 12:23 AM
Last Post: zhome888
  item = index position - list of list RavCOder 9 305 Dec-02-2019, 05:24 PM
Last Post: ThomasL
  delete from list metro17 8 344 Nov-19-2019, 06:42 AM
Last Post: buran
  Trying to print an uneven list to a even table Mike2607 6 255 Nov-19-2019, 06:14 AM
Last Post: perfringo
  Finding MINIMUM number in a random list is not working Mona 5 230 Nov-18-2019, 07:27 PM
Last Post: ThomasL
  List Comprehension - Creating a list of the length of an item help paul41 2 241 Nov-18-2019, 10:21 AM
Last Post: perfringo
  How do I delete symbols in a list of strings? Than999 1 198 Nov-16-2019, 09:37 PM
Last Post: ibreeden

Forum Jump:


Users browsing this thread: 1 Guest(s)