title: Why is there an Attribute Error: 'str' object has no attribute 'copy' for this code?
body: <p>Trying to create a deep copy of a dictionary without using copy module.</p>
  <pre><code>def deepcopy(data: dict):
      copy_dict = {}
  
      for keys, values in data.items():
          new_value = values.copy()
          copy_dict[keys] = new_value
  
      return copy_dict
  
  
  old = {&quot;Lion&quot;: &quot;brave&quot;, &quot;Tiger&quot;: &quot;striped&quot;}
  copied_dict = deepcopy(old)
  print(copied_dict)
  </code></pre>
  <p>This is the error I get:</p>
  <pre><code>line 11, in deepcopy
      new_value = values.copy()
  AttributeError: 'str' object has no attribute 'copy'
  </code></pre>
  <p>I should be able to create a copy of 'values' but I get this error message instead.</p>