add_menu_variable#

Cell.add_menu_variable(name, values, is_param=False, index=0)#

Add a menu variable.

Parameters:
namestr

Variable name.

valueslist[str, int, float, complex, Value]

Each element can be any type that can be converted to a Value instance.

is_parambool, default: False

Whether the new variable is a parameter. The default is False, which means it is a local variable.

indexint, default: 0

Index of the value that is initially selected.