Mar-16-2020, 09:49 AM
Ha, nice little printing exercise (one can print into file as well).
Using data from SO example:
Using data from SO example:
>>> j = {'rows_parsed': [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'i']]} >>> for k in j: ... print('{') ... print(f'{" " * 4}"{k}": [') ... print(*[f'{" " * 8}{item}' for item in j[k]], sep=',\n') ... print(f'{" " * 4}]') ... print('}') ... { "rows_parsed": [ ['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'i'] ] }
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.