![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Nov 2007
Posts: 64
Rep Power: 1
![]() |
Are nested lists indestructable?
Hello I am trying to create a program that involves writing a whole bunch of lists with information of its specific topic then grouping them together. Normally I would use a hash but they don't really let you create a whole bunch of variables that can be withdrawn later.
So my problem is when I nest them together, based on a random factor I want to delete so many of them from the back, but nothing I write seems to work I can see doing all this with a whole bunch of if: loops but I know there has to be some easier way here is my program(at least the part that pertains to it) (PS. all the importing and preperations are done I simply didn't print it) a=randint(6,11) aa=['name', 'att', 'def', 1] ab=['name', 'att', 'def', 1] ac=['name', 'att', 'def', 1] ad=['name', 'att', 'def', 1] ae=['name', 'att', 'def', 1] af=['name', 'att', 'def', 1] ag=['name', 'att', 'def', 1] ah=['name', 'att', 'def', 1] ai=['name', 'att', 'def', 1] aj=['name', 'att', 'def', 1] abspirlist=[aa,ab,ac,ad,ae,af,ag,ah,ai,aj] del abspirlist[a:] shuffle(abspirlist)
__________________
There are 10 kinds of people in this world, those who can read binary and those who can't. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pointers and Linked Lists | BstrucT | C | 8 | Feb 11th, 2008 2:33 AM |
| Sorting integer lists | sixstringartist | Python | 4 | Dec 4th, 2007 2:27 PM |
| Clarification Nested Lists | flebber | Python | 3 | Aug 31st, 2006 10:24 AM |
| Nested Lists | Mjordan2nd | Python | 2 | Oct 22nd, 2005 3:41 PM |
| For Each ... Next, Nested Array issues. | ChefBoiAreDee | Visual Basic | 2 | Mar 2nd, 2005 4:26 PM |