Hello,
I looked on the internet but failed to find a solution.
Here is the problem: I have a global variable – nested dict. I have multiple other dict vars referencing different data in the global dict.
How to sort the global dict in a way, that the referenced vars now show the sorted data?
In other words: How to sort a nested dict without creating a copy/duplicate? (sorted() doesn’t work – creates a duplicate)
Thanks in advance
submitted by /u/Unkle_P
[link] [comments]
r/learnpython Hello, I looked on the internet but failed to find a solution. Here is the problem: I have a global variable – nested dict. I have multiple other dict vars referencing different data in the global dict. How to sort the global dict in a way, that the referenced vars now show the sorted data? In other words: How to sort a nested dict without creating a copy/duplicate? (sorted() doesn’t work – creates a duplicate) Thanks in advance submitted by /u/Unkle_P [link] [comments]
Hello,
I looked on the internet but failed to find a solution.
Here is the problem: I have a global variable – nested dict. I have multiple other dict vars referencing different data in the global dict.
How to sort the global dict in a way, that the referenced vars now show the sorted data?
In other words: How to sort a nested dict without creating a copy/duplicate? (sorted() doesn’t work – creates a duplicate)
Thanks in advance
submitted by /u/Unkle_P
[link] [comments]