title: descriptor 'values' requires a 'dict' object but received a 'int'/'str' python
body: <pre><code>if 0 in dict.values(feedbackdict["%s" %log]):
      print ("Sorry, you have either not been left feedback for your spelling tesy yet or have not yet completed your spelling test. \nYou will be returned to the main menu.")
      LoggedInStudent(log)
  else:
      feedback = dict.values(feedbackdict["%s" %log])
      print (feedback)
  </code></pre>
  
  <p>So what I am trying to do is make sure that if the user has recieved no feedback (which means that the value of the key would be '0', that the program will recognise this and return the user to the main menu. However, if the feedback is not '0' then the program should recognise that there is a string there and define it as 'feedback' and then display it to show the user their feedback.</p>
  
  <p>I am trying to define 'feedback' as the value of a certain key (in this case the key is %log, which could be a user's name, for example 'matt') but when I try to execute this, I recieve the error:</p>
  
  <pre><code>TypeError: descriptor 'values' requires a 'dict' object but received a 'int'
  </code></pre>
  
  <p>I am confused as to why this is not working. Shouldn't 'feedback' simply be defined as the value which links to the key? For example, in my dictionary, the key 'Matt1' has the value 'Good job!', but when the program tries to gather this it gives me the error:</p>
  
  <pre><code>TypeError: descriptor 'values' requires a 'dict' object but received a 'str'
  </code></pre>
  
  <p>I am confused as to why the program is requiring a dict object. Is there any way to solve this? Sorry if the explanation is a bit sub-par. </p>