It's actually the same problem: both authors are converting code written for Python 2 to Python 3 and running into the same error:
TypeError: object of type 'zip' has no len()
Now, to answer your general question... It depends. Generally-speaking, you should be a bit reluctant to mark questions as duplicates when they concern problems in markedly different contexts, to avoid leaving future readers searching for answers to a problem in one context confused by the apparent switch to what would seem a completely different scenario. However, if the immediate context is the same, such that the problems can be understood as identical by both readers and answerers, it is helpful to mark them as duplicates so that future readers searching for solutions to the problem can find the solution, regardless of which context they're arriving from. See also: Dr. Strangedupe: Or, How I Learned to Stop Worrying And Love Duplication
Finally, I should note that in your example the questions have identical context: both authors are attempting to convert code from the exact same tutorial from Python 2 to Python 3. I've marked it as a duplicate.