Using the and-or Trick
And
When using and, values are evaluated in a boolean context from left to right. 0, '', [], (), {}, and None are false in a boolean context; everything else is true.
'a' and 'b'
If all values are true in a boolean context, and returns the last value,
'b'
"'' and 'b'
If any value is false in a boolean context, and returns the first false value
""
'a' and 'b' and 'c'
'a' and 'b' true return 'b'
'b and 'c' true return 'c'
so, the return of expression is 'c'
Reference:
http://www.diveintopython.net/power_of_introspection/and_or.html