Python Forum
"replace() method" fails to change string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"replace() method" fails to change string
#5
(Nov-30-2018, 05:26 PM)pw928gts Wrote: Thanks i see the problem, but why no error message?

Because there wasn't an error. What you did is completely valid. You created a new string based off of a base string, s, and a transformation (the text replace). Not assigning that new string to a variable isn't an error, except possibly a semantic error: http://interactivepython.org/runestone/s...rrors.html
Reply


Messages In This Thread
RE: "replace() method" fails to change string - by nilamo - Nov-30-2018, 05:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to replace a string with a file (HTML file) tester_V 1 772 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  Replace string in a nested Dictianory. SpongeB0B 2 1,213 Mar-24-2023, 05:09 PM
Last Post: SpongeB0B
  Replace with upper(string) WJSwan 7 1,588 Feb-10-2023, 10:28 AM
Last Post: WJSwan
  Find and Replace numbers in String giddyhead 2 1,243 Jul-17-2022, 06:22 PM
Last Post: giddyhead
  change string in MS word Mr_Blue 8 3,334 Sep-19-2021, 02:13 PM
Last Post: snippsat
  Replace String in multiple text-files [SOLVED] AlphaInc 5 8,154 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt
  Replace String with increasing numer [SOLVED] AlphaInc 13 5,052 Aug-07-2021, 08:16 AM
Last Post: perfringo
  Question about change hex string to integer sting in the list (python 2.7) lzfneu 1 2,537 May-24-2021, 08:48 AM
Last Post: bowlofred
  How to replace on char with another in a string? korenron 3 2,361 Dec-03-2020, 07:37 AM
Last Post: korenron
  How can I change a string. Mike Ru 3 2,449 Jun-03-2020, 10:55 AM
Last Post: buran

Forum Jump:

User Panel Messages

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