def not_friends(user, other_user):
 return all((not_the_same(friend, other_user) for friend in user['friends']))

def not_friends ( user , other_user ) : return all ( ( not_the_same ( friend , other_user ) for friend in user [ 'friends' ] ) )
other_user is not a friend if hes not in user["friends"]; that is .