Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43835 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2013-04-19 00:38 +1000 |
| Last post | 2013-04-19 00: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: Working with lists within Dictionaries Chris Angelico <rosuav@gmail.com> - 2013-04-19 00:38 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-04-19 00:38 +1000 |
| Subject | Re: Working with lists within Dictionaries |
| Message-ID | <mailman.775.1366295908.3114.python-list@python.org> |
On Thu, Apr 18, 2013 at 11:58 PM, inshu chauhan <insideshoes@gmail.com> wrote: > segments.setdefault(reg_num, [])[point] += point Not sure what your desired structure is. This is seeking to add the point to something indexed by the point; perhaps you simply want to append to the list itself? segments.setdefault(reg_num, []).append(point) ChrisA
Back to top | Article view | comp.lang.python
csiph-web