Python Forum
Text conversion to lowercase is not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text conversion to lowercase is not working
#2
The string method replace returns a copy of the string with all occurrences of substring old replaced by new.
old_text = " A B C D "
new_text = old_text.replace(" A ", " a ")
print(old_text)
print(new_text)
Output:
A B C D a B C D
Reply


Messages In This Thread
RE: Text conversion to lowercase is not working - by Yoriz - Jan-13-2024, 11:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Decryption not working if key has same symbol like text Paragoon2 0 340 Nov-11-2023, 09:32 PM
Last Post: Paragoon2
  while loop not working-I am using sublime text editor mma_python 4 1,192 Feb-05-2023, 06:26 PM
Last Post: deanhystad
  ANSI not working for change of text colors BliepMonster 10 3,506 Nov-10-2022, 09:28 AM
Last Post: BliepMonster
  How to properly scale text in postscript conversion to pdf? philipbergwerf 3 1,204 Nov-07-2022, 01:30 PM
Last Post: philipbergwerf
  python-docx- change lowercase to bold, italic Tmagpy 0 1,449 Jul-01-2022, 07:25 AM
Last Post: Tmagpy
  Replace changing string including uppercase character with lowercase character silfer 11 6,283 Mar-25-2019, 12:54 PM
Last Post: silfer
  Printing from a text file not working as I thought it would PythonZenon 10 6,202 Jun-02-2018, 09:19 PM
Last Post: snippsat
  Ending loop with string (capital & lowercase) MattWilk97 3 3,488 Oct-22-2017, 09:13 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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