Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42812 > unrolled thread
| Started by | inshu chauhan <insideshoes@gmail.com> |
|---|---|
| First post | 2013-04-05 18:04 +0530 |
| Last post | 2013-04-05 16:05 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Trying to understand working with dicts inshu chauhan <insideshoes@gmail.com> - 2013-04-05 18:04 +0530
Re: Trying to understand working with dicts Peter Pearson <ppearson@nowhere.invalid> - 2013-04-05 16:05 +0000
| From | inshu chauhan <insideshoes@gmail.com> |
|---|---|
| Date | 2013-04-05 18:04 +0530 |
| Subject | Trying to understand working with dicts |
| Message-ID | <mailman.136.1365165252.3114.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hello everyone,
Here in my part of the code where cc is a dictionary. I want to understand
what actually cc.iterkeys() and cc[k] actually doing.
I am already reading
http://docs.python.org/2/library/stdtypes.html#dict.items
and http://www.tutorialspoint.com/python/python_dictionary.htm but still
not very clear.
cc = Computesegclass(segimage, refimage)
for k in sorted(cc.iterkeys()):
i = argmax(cc[k])
print >> f, i+1
Thanks in Advance
[toc] | [next] | [standalone]
| From | Peter Pearson <ppearson@nowhere.invalid> |
|---|---|
| Date | 2013-04-05 16:05 +0000 |
| Message-ID | <as8b2uF1kddU1@mid.individual.net> |
| In reply to | #42812 |
On Fri, 5 Apr 2013 18:04:03 +0530, inshu chauhan <insideshoes@gmail.com> wrote: > --089e0111cf5068b65204d99c4d46 > Content-Type: text/plain; charset=ISO-8859-1 [snip] > Here in my part of the code where cc is a dictionary. I want to understand > what actually cc.iterkeys() and cc[k] actually doing. > I am already reading > http://docs.python.org/2/library/stdtypes.html#dict.items > and http://www.tutorialspoint.com/python/python_dictionary.htm but still > not very clear. > > cc = Computesegclass(segimage, refimage) > for k in sorted(cc.iterkeys()): > i = argmax(cc[k]) > print >> f, i+1 Is this a question about dictionaries, or a question about Computesegclass? In either case, an experiment without the added complexities of sorted() and argmax() would be better. -- To email me, substitute nowhere->spamcop, invalid->net.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web