Python Forum
str.replace affects the if statement!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
str.replace affects the if statement!
#4
The replace() method returns a copy of the string where all occurrences of a substring is replaced with another substring. When you rebuild the string from parts you are only replacing one occurrence. When using replace you do not need to search for "NOUN", the command does that work for you.
Reply


Messages In This Thread
str.replace affects the if statement! - by Eslam - Mar-29-2020, 10:01 PM
RE: str.replace affects the if statement! - by deanhystad - Mar-30-2020, 12:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search & Replace - Newlines Added After Replace dj99 3 4,405 Jul-22-2018, 01:42 PM
Last Post: buran

Forum Jump:

User Panel Messages

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