since sets in python are unordered collection,a set does't show the items it contains in the same order they have added. is it however safe to assume that the items will be displayed always in the same order?? eg.
i create the following set
test = set['regina', 'paul', 12, 'cool' ]
if i want to show the items in test
test
i may get the following output: set(['cool', 12, 'paul', 'regina'])
does it mean the items will be showed from now on in that same order?
thanks folks
i create the following set
test = set['regina', 'paul', 12, 'cool' ]
if i want to show the items in test
test
i may get the following output: set(['cool', 12, 'paul', 'regina'])
does it mean the items will be showed from now on in that same order?
thanks folks
Comment