Reverse string in Python | GeeksforGeeks

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Find Complete Code at GeeksforGeeks Article: www.geeksforge...
    This video is contributed by Shashank Mishra
    Please Like, Comment and Share the Video among your friends.
    Install our Android App:
    play.google.co...
    Follow us on Facebook:
    / gfgvideos
    And Twitter:
    / gfgvideos
    Also, Subscribe if you haven't already! :)

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

  • @akira_asahi
    @akira_asahi 2 года назад +2

    Thank you for the video. I am gratuful for your time and contribution. Kind regards, Akira.

  • @FundamSrijan
    @FundamSrijan Год назад +2

    I'm in class 11th and now I can finally understand what's going on 🙏🙏🙏

  • @tsewangstanzin9065
    @tsewangstanzin9065 3 года назад +5

    thank you very much i really needed this topic to learn ....

  • @casual_chess
    @casual_chess 6 лет назад +1

    Great work sir...please upload more python videos.

  • @arnavdas9781
    @arnavdas9781 Год назад

    AMAZING EXPLAINATION GODDAMN

  • @music_for_you....
    @music_for_you.... 2 года назад +1

    Thank you soo much

  • @rajansrivastav8201
    @rajansrivastav8201 5 лет назад +2

    when we take user input, the program is showing an error named as "Name Error : name is not defined".
    please upload the correct program.
    thank you

    • @angiedickerson6650
      @angiedickerson6650 4 года назад

      # Extended slice method to reverse a string
      inputStr = 'We will conquer COVID-19.'
      print(inputStr[-1 : : -1])

    • @gslvqz8812
      @gslvqz8812 4 года назад

      The program is correct. Please check your own code

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

      @@gslvqz8812 yes code is correct

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

      @@angiedickerson6650 nice this is very easy :-)

  • @gautampradeep564
    @gautampradeep564 Год назад +1

    Thank you sir

  • @sumitsaini2045
    @sumitsaini2045 Год назад +1

    not good plz explain this code
    def reverse(str):
    string = " "
    for i in str:
    string = i + string
    return string
    str = "racecar"
    print("The original string is:",str)
    print("The reverse string is:", reverse(str))

    • @anasc8674
      @anasc8674 11 месяцев назад

      When he did the for loop he made a range of the string that starts at the end of the string and goes back

  • @maimunaaktertripty5212
    @maimunaaktertripty5212 Год назад

    why its important to take initial string???//

  • @nazmulhasanoyon6424
    @nazmulhasanoyon6424 4 года назад

    Very easy video to learn the way to print string in reverse

  • @zara4257
    @zara4257 Год назад

    excellent!

  • @pratikagarwal1847
    @pratikagarwal1847 Год назад

    thank u sir

  • @silkercarvalho602
    @silkercarvalho602 3 года назад

    what this your site man ???

  • @h_aj_qo
    @h_aj_qo 3 года назад

    👍👍👍

  • @Learn._.Editing
    @Learn._.Editing Год назад +1

    Bhai hindi me bataona

  • @kranthimaddineni9709
    @kranthimaddineni9709 5 лет назад

    If there is words example "man kranthi"
    and only kranthi should be reversed

    • @sksohel4807
      @sksohel4807 4 года назад +6

      inputStr='man kranthi'
      step=inputStr[-1:-8:-1]
      print(step)

  • @Mani77302
    @Mani77302 28 дней назад

    First learn English properly thn take the classes 🤦😑