Conversation started Jun 30, 2011 at 17:01.
Ivo Flipse
Jun 30, 2011 17:01
@KronoS [] = list, () = set, {} = dictionary
KronoS
oh geez...
ok so what's the difference?
Ivo Flipse
that's what you get when you don't read books ;)
list and dictionaries are mutable
KronoS
@IvoFlipse agreed! or take any classes
Ivo Flipse
sets are immutable
dictionaries are hash tables and store items based on key:value combos
they can't be sorted, because it uses its own sorting to make lookups blazingly fast
KronoS
immutable being that once you make it it cannot be changed right?
Ivo Flipse
Jun 30, 2011 17:03
lists can be sorted, index whatever
KronoS
@IvoFlipse oh ok... that makes sense... if it's already 'sorted' according to a key... all we have to know if the key index
Ivo Flipse
yes, but obviously the easy workaround when you do need to change it is to make a new set with the same content in a different order and overwrite the old one
KronoS
@IvoFlipse right
Conversation ended Jun 30, 2011 at 17:04.
View all rooms
list, set, dictionary
Jun '11
30
Fake Programmers
The room for elite Super Users who realize they know nothing a...
context of the conversation
join this room
about this room
Participants
Ivo Flipse
57%
KronoS
42%
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile