title: TypeError: 'int' object is not iterable. Why am i getting this error? please help
body: <pre><code>def get_top_k(frequency, k):
      temp = frequency
      key = ""
      tvalues = []
      values = []
      kk = int(k)
      i = 0
      for i in temp.keys():
          key = i
          num = [int(frequency[key])]
          tvalues += num
      tvalues = bubble_sort(tvalues)
      i = 0
      for i in kk:
          num = [int(tvalues[i])]
          values += num
      print(values)
      i = 0
      result = {}
      for i in kk:
          result += {(str(temp[values[i]])):(int(values[i]))}
      return result
  </code></pre>