9951 explained code solutions for 126 technologies


pythonHow to get function arguments


def my_func(x, y, z):
  args = locals()ctrl + c
my_func

example function

locals()

returns dict with local variables (to make sure it includes arguments only, have it on the first line of the function)