I am trying to get my head around single line evaluations and this is what I came up with. I am sure there is a better more pythonic what to write this line.
s1 = 'abcdef'
s2 = 'abcdefghi'
ln = len(s1) if len(s2) > len(s1) else len(s2)
print(ln) # prints 6
edit: updated code This is more understandable for me though the result is the same.
ln = len(s1) if len(s1) < len(s2) else len(s2)
This is much easier to read.
ln = min( len(s1), len(s2) )