You have selected most common word with [0] in your statement, so terms is list with just two items - word and its count. When you iterate over it, you are getting word first and count second - you cant unpack it.
If you remove your [0], it will be possible to iterate over it ( k, v will be word, wordcount ). But if you want only count of most common word, just use terms[1] with your original terms.
If you remove your [0], it will be possible to iterate over it ( k, v will be word, wordcount ). But if you want only count of most common word, just use terms[1] with your original terms.