Format list of list sub elements keeping structure.
flebber.crue at gmail.com
Wed Jul 25 01:22:47 EDT 2018
> Well, your code was close. All you needed was a little tweak
> to make it work like you requested. So keep working at it,
> and if you have a specific question, feel free to ask on the
> Here's a tip. Try to simplify the problem. Instead of
> looping over a list of lists, and then attempting to do a
> format in the middle of an iteration, a format that you
> really don't know how to do in a vacuum (no pressure,
> right???), pull one of the sublists out and try to format it
> _first_. IOWs: isolate the problem.
> And, when you can format _one_ list the way you want --
> spoiler alert! -- you can format an infinite number of lists
> the way you want. Loops are cool like that. Well, most of
> the time.
> The key to solving most complex problems is to (1) break
> them down into small parts, (2) solve each small part, and
> (3) assemble the whole puzzle. This is a skill you must
> master. And it's really not difficult. It just requires a
> different way of thinking about tasks.
Thank you Rick, good advice. I really am enjoying coding at the moment, got myself and life in a good headspace.
More information about the Python-list