Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More list help please!
#1
Hi everyone,

I have a question that I can't figure out, I've been trying to find the answer myself.

I have created two lists and looped through them to create the final list
fruits []

I now want to assign 5 random fruits to each 'fruit basket' that I have created

I thought this might work:

while len (fruits_1) <5

but it just keeps looping through the code over and over.

How can I give 5 different fruits to each fruit basket?
Reply


Messages In This Thread
More list help please! - by Pytho13 - Mar-25-2021, 03:22 PM
RE: More list help please! - by michael1789 - Mar-25-2021, 03:53 PM
RE: More list help please! - by Pytho13 - Mar-25-2021, 04:54 PM

Forum Jump:

User Panel Messages

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