def unify_button_widths(*buttons):
 wid = 0
 for btn in buttons:
  wid = max(wid, len(btn['text']))
 for btn in buttons:
  btn['width'] = wid

def unify_button_widths ( * buttons ) : wid = 0 for btn in buttons : wid = max ( wid , len ( btn [ 'text' ] ) ) for btn in buttons : btn [ 'width' ] = wid
make buttons passed in all have the same width .