Python 3 Basics # 3.3 : Python Find and Replace Method

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 5

  • @skqureshnawaz
    @skqureshnawaz 2 года назад +1

    Nice

  • @shivakumarm8715
    @shivakumarm8715 2 года назад +1

    string = "I would like search and replace"
    #Just with "search" word I have replace string to "found and replace", how to do ?

    • @technologyCult
      @technologyCult  2 года назад +1

      string = "I would like search and replace"
      string.replace('search','found and replace')
      output - 'I would like found and replace and replace'

    • @shivakumarm8715
      @shivakumarm8715 2 года назад

      @@technologyCult
      Expected is
      output = “found and replace”