At work, I was given a task to return all global and local variables and their values from the given python code. I tried to do that with a debugger but I don't have enough knowledge and couldn't find sources of how to do that. What can you suggest or maybe you had some similar issue?
I need to write a program that takes as input a python code and returns (in the dictionary, stack, anyway) all local and global variables and their values.