Python Forum
Help? I can't figure this out.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help? I can't figure this out.
#2
replace all  code betweel try ... except with
with open(file) as f:
   line = f.readlines()
   if 'murder' in line:
       line = line.replace('murder', '------')
   ... do stuff with line ...
also remove for line in fhand:
and move the rest up to the ... do stuff ... line above
Reply


Messages In This Thread
Help? I can't figure this out. - by hentera - May-24-2017, 05:04 PM
RE: Help? I can't figure this out. - by Larz60+ - May-24-2017, 05:22 PM
RE: Help? I can't figure this out. - by volcano63 - May-24-2017, 07:35 PM
RE: Help? I can't figure this out. - by hentera - May-24-2017, 05:33 PM
RE: Help? I can't figure this out. - by buran - May-24-2017, 07:48 PM

Forum Jump:

User Panel Messages

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