1from ipywidgets import Layout, Button, Box
2
3items_layout = Layout( width='auto') # override the default width of the button to 'auto' to let the button grow
4
5box_layout = Layout(display='flex',
6 flex_flow='column',
7 align_items='stretch',
8 border='solid',
9 width='50%')
10
11words = ['correct', 'horse', 'battery', 'staple']
12items = [Button(description=word, layout=items_layout, button_style='danger') for word in words]
13box = Box(children=items, layout=box_layout)
14box
15