Q:

Appropriate Scala Collection similar to Python Dictionary

I have an algorithm that iteratively returns (key, value). What I want to do is store these results in a structure such that if the key does not exist, it will add it and the corresponding value. Now, if the key exists, it will append the value to an existing array of values.
In python, I can do this using a python dictionary with this format:
dict = {'key1': [val1, val2, val3],
        'key2': [val4, val5], 
        'key3': [val6], ... }

and simply do: 
if key in dict.keys():
    dict[key].append(value)
else:
    dict[key] = [value]

How do I do this in Scala?

A:

Maybe something like this?
scala> def insert[K,V](k: K, v: V, m: Map[K, List[V]]): Map[K, List[V]] = {
     | if (m contains k) m + (k -> (m(k) :+ v))
     | else m + (k -> List(v)) }
insert: [K, V](k: K, v: V, m: Map[K,List[V]])Map[K,List[V]]

scala> insert('b', 23, Map('b' -> List(2)))
res30: Map[Char,List[Int]] = Map(b -> List(2, 23))

scala> insert('b', 23, Map('c' -> List(2)))
res31: Map[Char,List[Int]] = Map(c -> List(2), b -> List(23))

Or, incorporating Sergey's very fine suggestion:
def insert[K,V](k: K, v: V, m: Map[K, List[V]]): Map[K, List[V]] =
  m + (k -> (m.getOrElse(k, List()) :+ v))

