I know, it's a noob question..
I have these variables:
pgwdth = 30;
mrgn = 0;
fmt = True
And this function:
def Param(x,pgwdth,mrgn,fmt):
parametros = x.split(" ")
if parametros[0][1] == "p":
numerozinho = int(parametros[1])
print "Changing pgwdth"
pgwdth += numerozinho
print pgwdth
elif parametros[0][1] == "m":
numerozinho = int(parametros[1])
print "Changing mrgn"
mrgn += numerozinho
print mrgn
elif parametros[0][1] == "f":
numerozinho = parametros[1]
print "On/Off"
if numerozinho == "on\n":
fmt = True
elif numerozinho == "off\n":
fmt = False
else:
"Error"
print fmt
else:
print "Error"
I just want it to return the variables that it used as arguments after changing it.
return x,pgwdth,mrgn,fmtas the last statement.