tests/basics: Add tests for if-expressions.
This commit is contained in:
parent
a31a3a9fd5
commit
a4f96c8c2a
9
tests/basics/ifexpr.py
Normal file
9
tests/basics/ifexpr.py
Normal file
@ -0,0 +1,9 @@
|
||||
# test if-expressions
|
||||
|
||||
print(1 if 0 else 2)
|
||||
print(3 if 1 else 4)
|
||||
|
||||
def f(x):
|
||||
print('a' if x else 'b')
|
||||
f([])
|
||||
f([1])
|
Loading…
Reference in New Issue
Block a user