def assert_before(lst, item1, item2):
 assert_less(lst.index(item1), lst.index(item2), '{0!r} appears before {1!r}'.format(item1, item2))

def assert_before ( lst , item1 , item2 ) : assert_less ( lst . index ( item1 ) , lst . index ( item2 ) , '{0!r} appears before {1!r}' . format ( item1 , item2 ) )
assert that item1 appears before item2 in lst .