Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9716 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2011-07-18 02:38 +1000 |
| Last post | 2011-07-18 02:38 +1000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Ordered list question Chris Angelico <rosuav@gmail.com> - 2011-07-18 02:38 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-07-18 02:38 +1000 |
| Subject | Re: Ordered list question |
| Message-ID | <mailman.1175.1310920684.1164.python-list@python.org> |
On Mon, Jul 18, 2011 at 2:28 AM, <jyoung79@kc.rr.com> wrote: > My question is, does python have a similar way to do something like this? > I'm assuming the best way is to create a dictionary and then sort it by > the keys? > That would be one way to do it. If you know beforehand what the highest ID is, you could create a list and treat it exactly the way you're treating the Javascript array, but I think the dictionary is probably a better option. Chris Angelico
Back to top | Article view | comp.lang.python
csiph-web