How to print variables in function?

Hi, lets think function

def help():
    a = 0
    b = 1
    c = linear(b)

How to now get these variables of this functions into some kind of list. I mean by that something like this:

thisdict = {
“a”: “0”,
“b”: “1”,
“c”: linear()

It can be also array, doesn’t matter. Some kind of way how to print all variables in function and not alphabetically but in order they were created

Thank you.

I think print(locals()) does what you want.

Also posted here: How to print variables in function?.