Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36190
| References | <ce887da5-1fad-49af-85e3-96ca41b7148c@googlegroups.com> |
|---|---|
| Date | 2013-01-06 02:59 +1100 |
| Subject | Re: Random List Loop?! |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.128.1357401564.2939.python-list@python.org> (permalink) |
On Sun, Jan 6, 2013 at 2:47 AM, Christian Gabriel <gabrieldenmark@gmail.com> wrote: > Hi > > I have tried now for ages to make a loop that does the following: > > Makes a new list with 9 random values, from 9 different lists, with 9 elements. > > And makes sure that none of the elements repeat! > > Is there anyone that can help, with a very simple solution?? Sounds like a homework question to me. You've tried. What code have you come up with, and to what extent does it fall short of your goal? The nine different lists - do they have unique elements? Are you able to use sets? (If you haven't been taught what a set is, the answer's probably no.) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Random List Loop?! Christian Gabriel <gabrieldenmark@gmail.com> - 2013-01-05 07:47 -0800 Re: Random List Loop?! Roy Smith <roy@panix.com> - 2013-01-05 10:54 -0500 Re: Random List Loop?! Chris Angelico <rosuav@gmail.com> - 2013-01-06 02:59 +1100 Re: Random List Loop?! Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-01-05 16:02 +0000
csiph-web