title: Swift 3: Change item in dictionary
body: <p>I'm saving lists in a dictionary. These lists need to be updated. But when searching for an item, I need [] operator. When I save the result to a variable, a copy is used. This can not be used, to change the list itself:</p>
  
  <pre><code>        item = dicMyList[key]
          if item != nil {
              // add it to existing list
              dicMyList[key]!.list.append(filename)
  //            item?.list.append(filename)
          }
  </code></pre>
  
  <p>I know, that I need the uncommented code above, but this accesses and searches again in dictionary. How can I save the result, without searching again? (like the commented line)
  I want to speed up the code.</p>