Source

Python 3 Patterns & Idioms / code / PythonForProgrammers / differentReturns.py

Full commit
1
2
3
4
5
6
7
8
9
# QuickPython/differentReturns.py
def differentReturns(arg):
    if arg == 1:
        return "one"
    if arg == "one":
        return True

print(differentReturns(1))
print(differentReturns("one"))