def for_user(user):
 recs = recommend_for_user(user)
 return 'For user {user}, who likes {liked}, we recommend {recs}.'.format(user=user, liked=', '.join(brandsfor.get(user, ['nothing'])), recs=', '.join(recs))

def for_user ( user ) : recs = recommend_for_user ( user ) return 'For user {user}, who likes {liked}, we recommend {recs}.' . format ( user = user , liked = ', ' . join ( brandsfor . get ( user , [ 'nothing' ] ) ) , recs = ', ' . join ( recs ) )
return a pretty-print string of recommendations for a user .