Print

Example of using ‘or’ in a print statement:

for num in range(1,51):
    msg = ''

    if num % 3 == 0:
        msg += 'Fizz'

    if num % 5 == 0:
        msg += 'Buzz'

    print (msg or num)

If msg is not ‘’, will print the message, otherwise will print the number.