This code:
#!/usr/bin/env python
def f(a):
print(f"{locals()}")
if __name__ == '__main__':
f(1)
Output: {'a': 1}
Want to do something like this:
#!/usr/bin/env python
def f(a):
kwargs["b"] = 2
print(f"{locals()}")
if __name__ == '__main__':
f(1)
to get the output {'a': 1, 'b': 2}
What's the right syntax for that?