Shorter, more pythonic way of writing an if statement

Viewed 54056

I have this

bc = 'off'

if c.page == 'blog':
    bc = 'on'

print(bc)

Is there a more pythonic (and/or shorter) way of writing this in Python?

6 Answers
Related