You might decide that you need to look at each of bob’s followers. This would be a loop, so now you can pull up a reference for what a loop looks like and eventually end up with the ability to print out each of bob’s followers, showing successfully having obtained access to each one.
You’d do something similar for tina’s followers, you’d want to look at all of those too. When would you want to look at them? And where is the code executing at that time? Put that there.
You’d do some comparison. What exactly do you want to compare? Maybe you’d then look up operators and see if there’s something you can use there.
If you decide that you need to add a result to an array, then, that would be an action you can look up how that’s done.
Each of the above are really small problems. They’re smaller than the overall thing, because I had some thoughts on what needs to happen which gives me a reference and gives me the ability to split the problem into smaller problems before I at all consider code. So deciding on the actions comes first, if you reason about your program in terms of actions, then you’ll have a much easier time. So why did you get some particular output? Well you carried out some couple of actions, what actions are those, should those actions lead to this output? If not, were the actions correctly implemented, you could print out information about what was being done to observe whether the right thing was done.
If you for example have some output that you didn’t expect, and you don’t know what actions you carried out, then, you’re pretty lost, and you’re not about to solve that problem. To get back on track you would consider what needed to happen and then compare your code to that. If you don’t know exactly how to read your code and you also don’t know what’s supposed to happen then you leave yourself no way to proceed.