Apr-05-2022, 02:16 AM
(This post was last modified: Apr-05-2022, 02:17 AM by IdMineThat.)
I'm breaking apart a text string line by line with a for loop. Is it possible to get to the next line, without starting at the beginning of the loop?
import requests webpage=((requests.get('http://SomeRandomWebPage.com')).text) Counter = 0 for line in webpage.split('\n'): Counter = Counter + 1 print("Doing Stuff Here") if Counter == 8: ##I want to read the next line from webpage here, without starting at the beginning of the for loop print("Do Different Stuff Here") continue