A = 'I am string'
B = 'I am string too'

if len(A) > len(B):
    print('', 'has length', len(A), 'and is the longest of the two strings')
    print('', 'has length', len(B), 'and is the shortest of the two strings')
elif len(A) < len(B):
    print('', 'has length', len(B), 'and is the longest of the two strings')
    print('', 'has length', len(A), 'and is the shortest of the two strings')
else:
    print('', 'has length', len(A), 'and it is as long as the second string')
    print('', 'has length', len(B), 'and it is as long as the second string')