or statement // Python One-Liner Tips & Tricks




[ad_1]

In this episode, we learn about a special or statement in Python that helps simplify certain if/else statements.

Source


[ad_2]

Comment List

  • Noah Rubin
    November 29, 2020

    Great video, I have been using python for almost a year and did not know most of the content in this video. Please carry on the series 🙂

  • Noah Rubin
    November 29, 2020

    Nice!

  • Noah Rubin
    November 29, 2020

    Nice! I don’t know how to use the input() yet so I used the following in IDEL:
    a=1
    b=“”
    Print(a or ‘Empty’) #prints 1
    Print(b or “Empty’) #prints Empty

Write a comment