unexpected output while using list(and nested dictionary)

Ben Finney ben+python at benfinney.id.au
Thu Jul 23 11:52:54 EDT 2015


max scalf <oracle.blog3 at gmail.com> writes:

> I am sorry for doing what i did (asking question in Stackoverflow and
> pasting the link here).

No harm done. The rule isn't special to this forum; it's best to
minimise the fragility of your message by not relying on many sites all
staying the same over a long time.

> Do you guys have any suggestion as to what to use if the code is lone,
> as the formatting gets lost in an email...

First, always post in “plain text”; don't present program code in a
“rich text” or “HTML mail” or any other magical formatting tool.

Second, don't post long code examples. Work up a small, self-contained,
complete compilable example <URL:http://sscce.org/> so that there isn't
any extraneous material, only the code that demonstrates the behaviour
that confuses you.

The reason to do that for presentation here is that you want the code to
be short enough that people will find it worth their time to volunteer
to help you.

But an important side benefit is: in stripping the example down so that
it doesn't contain anything not needed to demonstrate the behaviour, you
may end up understanding it well enough to solve the problem yourself —
which is a valuable skill and very much worth your while :-)

-- 
 \       “If you always want the latest and greatest, then you have to |
  `\          buy a new iPod at least once a year.” —Steve Jobs, MSNBC |
_o__)                                             interview 2006-05-25 |
Ben Finney




More information about the Python-list mailing list