else do nothing python code example
Example 1: python do nothing
# To do nothing within a statement, use pass
good = True
if good:
pass
else:
print('This is not good')
Example 2: lambda if else nothing python
lambda x: x if (x<3) else None
# To do nothing within a statement, use pass
good = True
if good:
pass
else:
print('This is not good')
lambda x: x if (x<3) else None