How can I pretty-print a (possibly nested) Python list with indices , similar to the Perl's Data::Printer
module, eg for L = ['a', 'b', None, 'c']
the output should be something like this:
[
[0] 'a',
[1] 'b',
[2] None,
[3] 'c',
]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.