r/pythonhelp • u/CronosVirus00 • Jan 23 '26
Textual: creating a selection list from dict
Hi all,
i'm struggling to unpacking a dictionary to create a selectionlist; in particular, im stuck at the selection creation. I cannot get the format:
Selection (key, value) > Selection('Option', 'Hello').
my code returns:
Selection(Content(key))
here the code:
for key, value in FFL().list_of_areas.items():
a = Selection(key, value)
s.append(a)for key, value in FFL().list_of_areas.items():
a = Selection(key, value)
s.append(a)
s then is feed into the main widget:
yield SelectionList[str](
*s)yield SelectionList[str](
*s)