'Print all dictionaries and a variables [duplicate]
I have like 10 dictionaries and I want to print all the dictionaries with all the keys inside.
Dict1 = {}
...
Dict10 = {}
We could do:
print(list(Dict1.keys()))
...
print(list(Dict10.keys()))
But is there a code more simple to do this? Like a for loop?
I'm working on a project where:
- Operator types get_report
- The program looks for all dictionaries in another .py file and print all the keys from every dictionary
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
