Python Program to Reverse a String Using For Loop - In Hindi

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Python Program to Reverse a String Using For Loop - In Hindi - Tutorial#50
    In this video I have explained that how the string is reverse in python. Reversing a string may be done by many ways. The first way to reverse a string is to use the slicing concept and the second is to used indexing mechanism. In this video, I have explained the concept regarding the reversal of a string.
    Dear Friends, please help this channel to grow. I will keep uploading quality python tutorial for you.
    Facebook Group: www.facebook.c...
    Facebook Page: / codeitup-104310264625489
    Website: codeitup.in
    Link to Previous Video: • Python String Function...
    Link to Next Video: • Python Program To Coun...
    Tags Used:
    reverse a string in python
    reverse a string in python using for loop
    reverse a string using while loop
    reverse a string in python 2.7
    reverse a string in python 3
    python string reverse
    python string reverse program
    python string reverse for loop
    reverse string program in python
    string reverse in python
    palindrome program in python
    palindrome string program in python
    python reverse string
    reverse a string
    how to reverse a string in python
    #codeitup
    #python
    #string

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

  • @shikhakumari8587
    @shikhakumari8587 4 года назад +30

    Sir i m in class 11th i was not able to understand python at all but jabse aapke channel pata chala to bahut aasan lgta hai... Nd mai apne sare frnds ko v batati hu aapke channel ke bare me..

    • @codeitup
      @codeitup  4 года назад +8

      Thanks shikha! Students like you are my only hope. Thanks for your kind comment.

  • @itzpkg
    @itzpkg 5 лет назад +13

    Sir this is starting of your channel
    I think you will get great succes in your this channel further time
    After 1 year all of us used to aware about python for jobs and for students also
    I am also a student i want to learn python from you

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

      Thanks PKG. Kindly support this channel to grow.

  • @swarnasingh3716
    @swarnasingh3716 10 месяцев назад +2

    Excellent lecture sir .Love they way you explain each and every concept in detail even if u have already explained the concept earlier .The day I found this channel was infact one of the best days of my student life coz computer has never been this much easier to me as it is now
    Thank u sir for such an energetic lecture❤😊

  • @itzpkg
    @itzpkg 5 лет назад +5

    Thanks a lot sir
    I am sharing your videos to all
    I hope i will get proper videos for understanding "python"
    Armstrong, Neon like
    No prime or Non prime

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

      Thanks a ton Pkg.

  • @hemlatachohan6050
    @hemlatachohan6050 3 года назад +3

    I regret why I didn't find your channel in 11 only .....but ...thanks a lot ..your explanation is very clear ...

    • @codeitup
      @codeitup  3 года назад +1

      No Problem Hemlata, Der aae durust aae !

    • @n.rgangwar2219
      @n.rgangwar2219 3 года назад

      Jnn ye you are right😭

  • @chemistryatyourstep214
    @chemistryatyourstep214 Год назад +4

    Hello Sir, I am a first year btech cse student ! They are teaching python in first sem....Also Sir I have followed you since my 11th class and for revision I am back with you !! Just want to Thankyou sir for helping each of us
    Literally it's my continuously third year with you sir 😃😃

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

      Thank you so much for your love dear, keep learning.
      God bless you!

  • @manjotkahlon2011
    @manjotkahlon2011 3 года назад +3

    thank you so mch sir well explanation will follow u to learn python

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

      Thanks & most welcome Manjot!

  • @swagatamath1615
    @swagatamath1615 3 года назад +3

    sir your second alternative program isn't showing the reverse but printing as it is..

  • @asiyaaman6610
    @asiyaaman6610 3 года назад +1

    Awesome.. Applaud

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

      Thanks Asiya😊

  • @faizalkhalifa9187
    @faizalkhalifa9187 3 года назад +1

    thinks sir

  • @sudarshanmhaisdhune1039
    @sudarshanmhaisdhune1039 4 года назад +1

    Nice n humble teaching bro ....

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

      Thanks and welcome🙂

  • @devanshgoel1407
    @devanshgoel1407 4 года назад +5

    hi sir,
    a = 'ram'
    for i in range((len(a)-1),-1,-1):
    print(a[-i],end="")
    output : amr

    • @codeitup
      @codeitup  4 года назад +1

      Perfect but the output will be: mar
      I think you mistyped it.😇

    • @paramjeetmodi5989
      @paramjeetmodi5989 4 года назад +1

      No, the output would be amr

    • @minad3993
      @minad3993 3 года назад +1

      The problem is in line 4:
      print(a[i], end = "")
      you have put a[-i]

  • @ShadabAnsari-dt4ni
    @ShadabAnsari-dt4ni 3 года назад +1

    We can also use simple method
    a="shadab"
    print(a[::-1])
    Out put :- badahs

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

    This vedio is helpfull

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

    amazing...you made it really easy to understand...

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

    we should thanks for this sir,
    thanqq so muck sir.

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

      Most welcome Mamta!

  • @fit_tubes_365
    @fit_tubes_365 8 месяцев назад

    ThankYou!

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

    Very nice video hai sir thanks❤❤❤❤

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

    Thanku so much sir...

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

      Most welcome Yash!

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

    Good job..thankyou sir

  • @digitaladi_2007
    @digitaladi_2007 4 месяца назад

    thanks sir

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

    Tq sir it’s very helpful ♥️🙏

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

    I wish if i would have seen this before so my practicl would be muchh better

  • @AnuragMishra-ob1er
    @AnuragMishra-ob1er Год назад

    Thanku sir ji

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

    Hi sir, pls make video on shallow copy and deep copy

  • @tanvedzmakkar231
    @tanvedzmakkar231 4 года назад +1

    hello sir,
    i have seen your videos your number 49 that is this one and i wanted to know if there are any sites which have questions for these topics as i wanted to practice until what i have done because i think i won't be ale to remember everything without practice.
    Thanks

    • @codeitup
      @codeitup  4 года назад +1

      Dear Tanvedz,
      In my videos I have covered almoat evey question. Step by step see them all and practice it. Specially there is no website for only questions but you may refer w3schools.com for notes.

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

      @@codeitup k

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

    Sir aapne 3rd line mai print(a[i] kya kya matlab hai humne square bracket kyu lgaya

  • @ubuntuguru7288
    @ubuntuguru7288 5 месяцев назад

    Sir but if the stop value is -1 it will go till -1-1 na that is -2 how it will go till 0....

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

    Nicely understood

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

      Okk, keep learning😊

  • @AkshatGusain-nf4mw
    @AkshatGusain-nf4mw Месяц назад

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

    Good work.But I'm not very good at hindi.Could you please explain about a[i] in English.

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

      a[i] is basically the values contained on the i index.

  • @leemabandelu1917
    @leemabandelu1917 4 года назад +1

    a=input("shyaam");
    print(a[-1::-1]);
    sir here the answer is still coming shyaam and is not reversed?

    • @aneerana1
      @aneerana1 3 года назад +1

      remove 'input' and ';'

    • @rohitpatil5224
      @rohitpatil5224 3 года назад +1

      a=input('enter string')
      print(a[-1::-1])
      it will work

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

    Sir tq so much

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

      Most welcome.

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

      Really d way u say is really very easy plz tell me if u say online python course am interested along with assignment

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

    hello sir, please run the program but some of the program get the error. at least one of the program in video must be run

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

    Sir we are giving -1 as a step value ., by default will it not take -1??

    • @codeitup
      @codeitup  4 года назад +1

      No Sameeksha, by default the step value is 1 (positive 1). So, if we want the step value as -1 we need to gve it.

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

      @@codeitup Ok got it sir.
      thankyou

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

    Sir is program me initial value -1 dene ki zarurat nahi thi. Bina initial value diye hum sirf step value -1 de to bhi string reverse ho sakti hai

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

    without using built in functions can u share it

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

    Sir apne baki methods to batae hi nahi pehle video mein jaise capitalize count

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

    hi bro can u pls check this below code for the string reversal:
    user_string = input("Please enter a string.")
    reversed = ""
    for item in range(len(user_string) - 1, -1, -1):
    reversed += user_string[item]
    print(reversed)
    why here in for loop three -1's are given

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

    my school work is given to make program which performs various function class 11
    please suggest

  • @Gangsta-aj5
    @Gangsta-aj5 3 года назад +1

    Helpfull in class 12

    • @codeitup
      @codeitup  3 года назад +1

      Glad to help you Ajay!

    • @Gangsta-aj5
      @Gangsta-aj5 3 года назад

      @@codeitupcan u pls tell me how many ques. Of function comes in finals

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

    Sir... Len(a) -1 : lagega ya fir ,
    ?

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

      Sirf len(a) hoga because indexing 0 se start hota hai...

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

      @@codeitup no sir I m asking....kii
      : Kab lagega aur , kab lagega

  • @meow-rd6op
    @meow-rd6op 3 года назад

    💥

  • @anilmajhi9539
    @anilmajhi9539 4 года назад +2

    In this loop ....code doesn't work
    TypeError:'tuple' object cannot be interpreted as an integer

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

      Just try to type correctly. I think you have mistyped something as the program runs and i have showed it in the tutorial...

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

      @@codeitup I have also got the same error

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

      Pls paste your code here

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

    a[i] kese work kr rha h loop m

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

    please use while loop ...

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

    Not working... why??

  • @PRADEEPCHOUDHARY.
    @PRADEEPCHOUDHARY. 3 года назад

    String ki jagha Array ho to kaise karenge Anand sir ye program

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

      ruclips.net/video/WybdXuEaKLQ/видео.html

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

    1 .Write a program to reverse a number.
    2 .Write a program to find the sum of the digits of a number accepted from
    use
    Sir please solve me

    • @codeitup
      @codeitup  3 года назад +1

      1. Reverse a number: ruclips.net/video/5bM8JOHZH44/видео.html
      2. Sum of digits - ruclips.net/video/-PPkWv2D2K0/видео.html
      Follow the python playlist and will get every program:
      ruclips.net/p/PLmRclvVt5DtmcLF3ywxKg692lhfD6SUOr

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

      @@codeitup thanks you sir

  • @ajaydalaya2195
    @ajaydalaya2195 5 месяцев назад

    kuch samaj mai nahi aaayaaaa