def for_brands(brands):
 brands = safe_brands(brands)
 recs = recommend_for_brands(brands)
 return 'For a user who likes {liked}, we recommend {recs}.'.format(liked=', '.join(brands), recs=', '.join(recs))

def for_brands ( brands ) : brands = safe_brands ( brands ) recs = recommend_for_brands ( brands ) return 'For a user who likes {liked}, we recommend {recs}.' . format ( liked = ', ' . join ( brands ) , recs = ', ' . join ( recs ) )
return a pretty-print string of recommendations for brands alone .