I would like to define a variable using an if statement, for example:
I know the above does not work, but is there a way of defining 'c' with an if statement or something similar?
Thank you
1 2 3 4 5 6 7 |
a = 0 b = 1 if a = 0 : c = b else : c = a |
Thank you
buran write Oct-24-2020, 02:06 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.