The selected() method, called without any parameters, will return all selected items' index of the ListBox widget.
The selected(index, bool) method is used to select or unselect(depending on second boolean parameter) particular item on the passed index position.