0

if we use:

set('abc')

we will get :

set(['a', 'c', 'b'])

My question is why not:

set(['a', 'b', 'c'])

Thank you!

DYZ
  • 55,249
  • 10
  • 64
  • 93
Tan Phan
  • 337
  • 1
  • 4
  • 14
  • 1
    `set`s are unordered collections. – iz_ May 12 '19 at 02:45
  • This is probably a duplicate. Nevertheless, the `set` and `dictionary` types are unordered, and their representations are based on the hash values of the items (not useful). – Rockybilly May 12 '19 at 02:45

1 Answers1

1

W3schools answer: Sets are unordered, so the items will appear in a random order.

Read more about them: https://www.w3schools.com/python/python_sets.asp

:)

Raul Lucaciu
  • 132
  • 7