Python Forum
random.shuffle(list) produces empty list - why?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
random.shuffle(list) produces empty list - why?
#3
(Oct-16-2016, 05:32 PM)Yoriz Wrote: random.shuffle changes the list in place instead of returning a shuffled list.

Thank you for your reply!
English is not my mother tongue, so what do you mean by "changes the list in place"?

Henrik
Reply


Messages In This Thread
RE: random.shuffle(list) produces empty list - why? - by HeRo - Oct-16-2016, 05:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Entry field random pull from list, each return own line Bear1981 6 788 Feb-25-2025, 06:09 AM
Last Post: Pedroski55
  what to return for an empty list Skaperen 2 1,190 May-24-2024, 05:17 PM
Last Post: Skaperen
  Strange behavior list of list mmhmjanssen 3 1,613 May-09-2024, 11:32 AM
Last Post: mmhmjanssen
  Code with empty list not executing adeana 9 5,768 Dec-11-2023, 08:27 AM
Last Post: buran
  Sample random, unique string pairs from a list without repetitions walterwhite 1 1,878 Nov-19-2023, 10:07 PM
Last Post: deanhystad
  No matter what I do I get back "List indices must be integers or slices, not list" Radical 4 2,602 Sep-24-2023, 05:03 AM
Last Post: deanhystad
  Delete strings from a list to create a new only number list Dvdscot 8 3,346 May-01-2023, 09:06 PM
Last Post: deanhystad
  find random numbers that are = to the first 2 number of a list. Frankduc 23 7,120 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  List all possibilities of a nested-list by flattened lists sparkt 1 1,772 Feb-23-2023, 02:21 PM
Last Post: sparkt
  List of random numbers astral_travel 17 5,696 Dec-02-2022, 10:37 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020