Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with parsing using re
#2
The code you gave won't run, but assuming you dedent the for loop and give it a colon, you are looping over the wrong thing. You are looping over myfile_contents, which is just the original, unparsed file. You want to loop over ip, which is where you stored all of the ip addresses.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Help with parsing using re - by ggj13557 - Jul-14-2018, 03:58 PM
RE: Help with parsing using re - by ichabod801 - Jul-14-2018, 05:14 PM
RE: Help with parsing using re - by snippsat - Jul-14-2018, 05:50 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020