G
GC-Martijn
Hello,
I'm trying to do a if statement with a function inside it.
I want to use that variable inside that if loop , without defining it.
def Test():
return 'Vla'
I searching something like this:
if (t = Test()) == 'Vla':
print t # Vla
or
if (t = Test()):
print t # Vla
------------------------------------------
The long way
t = Test()
if (t == 'Vla':
print t # must contain Vla
Greetings,
GCMartijn
I'm trying to do a if statement with a function inside it.
I want to use that variable inside that if loop , without defining it.
def Test():
return 'Vla'
I searching something like this:
if (t = Test()) == 'Vla':
print t # Vla
or
if (t = Test()):
print t # Vla
------------------------------------------
The long way
t = Test()
if (t == 'Vla':
print t # must contain Vla
Greetings,
GCMartijn