P loop confusion

Here’s also a link to a post that contains code with a p loop