Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. c = {key_1:val_1, key_2:val_2, key_3:val_3}
  2.  
  3. c[key_1] # returns val_1, as in a dictionary
  4. c(1) # returns val_2, as in a list
  5. c{val_3} # returns (2, key_3) as in a sort of "indexed dictionary"
Add Comment
Please, Sign In to add comment