Radio
Syntaxe
-
class
Radio(**kwargs)¶ -
set_items(items)¶ Set the list of items used as choices.
-
set_sol(index)¶ Set the solution item by giving its index in the list of items.
-
shuffle()¶ Shuffle the items.
-
Exemples
>>> input = Radio()
>>> input.set_items(["Paris", "Rome", "Berlin"])
>>> input.set_sol(0)
>>> input.shuffle()