I'm making the transition from java to python and I'm confused about how for loops work in python. I know basically all for loops in python are for-each loops, but that's not what I need. I've built a scraper, and I'm just trying to condense the code a little. My current issue is that I call for status codes in my responses, so I have ten or twelve lines of response1.status_code
response2.status_code
etc. If I were in java, I could write something along the lines of
for (int i=1; i<=12; i++){
if (response[i].status_code != 200)
System.out.print("error in response"+[i])};
but that doesn't seem to exist in python, so I'm not quite sure where to turn. Any advice is appreciated!