Python Forum
how to list/count the number of dictionaries - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: how to list/count the number of dictionaries (/thread-22587.html)



how to list/count the number of dictionaries - paul18fr - Nov-18-2019

Hi all

I'm using dictionaries to record physical quantities (tensors, vectors, scalars) from a (huge) Ascii file.
After reading, I've several dictionaries I would like to record (in a hdf5 file); obviously their number differs from a result file to another one

From a single dictionary, we can find a lot of materials saying how to list, count, get keys and values, but I haven't found so far a way to count and list the number of distionaries I have: how to proceed?

Thanks for your support

Paul


RE: how to list/count the number of dictionaries - buran - Nov-18-2019

please, show your code, i.e. how you create your dicts


RE: how to list/count the number of dictionaries - paul18fr - Nov-18-2019

Sorry I understand my mistake (I've been confused)

Basically I just need to create a list where all dictionaries are recorded and called afterward Sick