[Tutor] quick function variable
Nathan Smith
nathan-tech at hotmail.com
Tue Feb 8 19:02:25 EST 2022
Hi guys,
Consider the following:
def func(name="bob", lastname="bobland", chicken="soup"):
print("Hello")
if I wanted to call this function and only change the variable name I
could do:
func(name="Jimmy")
How could I do this in variables?
EG:
variable_change="name"
value="Bob"
func(variable_change=value)
Thanks
Nathan
--
Best Wishes,
Nathan Smith, BSC
My Website: https://nathantech.net
More information about the Tutor
mailing list