# like PHP
number_hash = {
 "PI" => 3.14,
 "Golden" => 1.618,
 "e" => 2.718
}
puts number_hash["PI"]
# Convert an array to a hash
superheros = Hash[
 "Clark Kent",
 "Superman",
 "Bruce Wayne",
 "Batman"
]
puts superheros["Clark Kent"]
superheros["Barry Allen"] = "Flash"
samp_hash = Hash.new("No Such Key")
puts samp_hash["Dog"]
superheroines = Hash[
 "Lisa Morel",
 "Aquagirl",
 "Betty Kane",
 "Batgirl"
]
# Like Python
superheros.update(superheroines)
superheros.each do |key, value|
 puts key.to_s + " : " + value.to_s
end
# Some Methods:
# .has_key?(...)
# .has_value(...)
# .empty?
# .size
# Delete a key
superheros.delete("Barry Allen")