Python Forum
Problem with For "str" in str["str"]:
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with For "str" in str["str"]:
#2
Your condition "if result[0] in f:" might be convenient but is very inefficient and faulty as you know.
Why not check directly for equality?
if result[0] == f[-len(result[0]:]:
Reply


Messages In This Thread
RE: Problem with For "str" in str["str"]: - by ThomasL - Sep-05-2019, 12:23 PM

Forum Jump:

User Panel Messages

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