Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = {
- 'yvr' => 'Vancouver',
- 'yba' => 'Banff',
- 'yyz' => 'Toronto',
- 'yxx' => 'Abbotsford',
- 'ybw' => 'Calgary'
- }
- keys = list.keys
- # Why is it returning nil instead of first element of the list above
- p list[keys[0]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement