Saturday, April 1, 2023

MODIFYING STRING METHODS USING PYTHON PROGRAMMING

                                             MODIFYING STRING METHODS

   a="Hey,Beautiful!"

  #upper case

   print(a.upper())

   #lower case

   print(a.lower())

   a="  Hey,beautiful!"

  #remove whitespace

  print(a.strip())

  a="hey,beautiful!"

  #replace word

  print(a.replace("hey","Hai"))

  a="hey,beautiful!"

  #split words

  print(a.split(","))

                OUTPUT:

      HEY,BEAUTIFUL!

       hey,beautiful!

       Hey,beautiful!

         Hai,beautiful!

        ['hey', 'beautiful!']



USD TO INR C++ PROGRAMMING

  NALLAMUTHU GOUNDER MAHALINGAM COLLEGE                                                 POLLACHI-642001                                     ...