Dec-08-2020, 10:21 PM
The code below is running inside a while True loop
Problem with my code is it seems you cannot return in ternary conditions.
if play=='y':
print('ok')
else:
return FalseI would like to write those lines in a ternary form.Problem with my code is it seems you cannot return in ternary conditions.
print('ok') if play=='y' else return FalseIs there a way to achieve this?
