Python using function with if -
I'm trying to do the following:
Is there any way to do this like this?
Or should I stay as usual:
if a & amp; B: myChain = myChain (a, b)
Thanks!
If you want to block your second code in one line, you can delete the new line :
If A & B: myChain = myChain (a, b)
If you absolutely do not want to use the if
statement, you can use conditional expressions like As you did in your first code block, but this is an unusual way of doing this.
myChain = My China (A, B) if A & B other myChain
Comments
Post a Comment