Advertisement
Guest User

Untitled

a guest
May 28th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1.  
  2.  
  3. list = {
  4. 'yvr' => 'Vancouver',
  5. 'yba' => 'Banff',
  6. 'yyz' => 'Toronto',
  7. 'yxx' => 'Abbotsford',
  8. 'ybw' => 'Calgary'
  9. }
  10.  
  11. keys = list.keys
  12.  
  13. # Why is it returning nil instead of first element of the list above
  14. p list[keys[0]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement