Python Program to Check a String is Palindrome or Not - In Hindi

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Python Program to Check a String is Palindrome or Not - In Hindi Tutorial #53
    In this tutorial I have explained a program to check whether a given string is palindrome string or not. A palindrome string is one whose reverse is equal to the original string. For example if we reverse a string MADAM then the reverse of the string will be MADAM which is similar to the original string and hence this is called Palindrome 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 String Function...
    Tags Used:
    palindrome
    palindrome program
    palindrome program in python
    palindrome string program in python
    string slicing in python
    string reverse in python
    string palindrome in python
    string in python
    string in python in hindi
    python string programs
    python string fuctions
    python string slicing
    palindrome number
    palindrome string program
    python program plaindrome
    palindrome or not
    #codeitup
    #string
    #string

КОМЕНТАРІ • 120

  • @shailyraj7413
    @shailyraj7413 4 роки тому +14

    Thank you sir for making this so much easier..thank you so much🙂

    • @codeitup
      @codeitup  4 роки тому +2

      Thanks shaily. Your support needed for the growth of this channel. Keep learning keep supporting.

    • @akshaysapatal7858
      @akshaysapatal7858 2 роки тому

      @@codeitup a

  • @govindasindhu3728
    @govindasindhu3728 2 роки тому +1

    THIS WAS A VERY SIMPLE QUESTION WHICH MY INTERVIWER STATED WITH , BUT I DID SO MANY NUMBER QUESTIONS THAT I FORGOT HOW TO ENTER A STRING AT THAT TIME . SO FROM THEN I DONT TAKE ANY PROGRAM AS EASY . THANKU FOR MAKING THIS VIDEO.

  • @StudyGuru1504
    @StudyGuru1504 3 роки тому +2

    a person who can make each program easy for us thank u so much sir keep making questions/answer videos plz sir a humble request from ur student plz sir on python class 11

    • @codeitup
      @codeitup  3 роки тому

      Sure ! Thanks for the complement.

  • @anupamjha8381
    @anupamjha8381 2 роки тому +1

    Best ever in short,,, I ever seen
    Appreciate your work

  • @sakshigupta3998
    @sakshigupta3998 7 місяців тому +1

    Sir, your way of teaching methods and explanation is very useful for me..
    Thank for making the videos for us..

    • @codeitup
      @codeitup  7 місяців тому

      Glad to hear that!

  • @Rdx.Vlog_mithlesh
    @Rdx.Vlog_mithlesh 3 роки тому +2

    Thanku sir very useful c programming language the best important trick

  • @shubhamkakade4534
    @shubhamkakade4534 4 роки тому +3

    You have excellent teaching skill, sir and thank you so much for providing useful contains.

    • @codeitup
      @codeitup  4 роки тому +1

      So nice of you🙂

  • @ankitparmar72
    @ankitparmar72 4 роки тому +1

    Very nice explanation sir 👍👍

    • @codeitup
      @codeitup  4 роки тому

      Thanks and welcome🙂

  • @rajatsingh-krishna
    @rajatsingh-krishna 3 роки тому +1

    Thank you sir for makeing so much easy program

  • @TNGOA
    @TNGOA 2 роки тому +2

    Thank you sir . It's easy to understand 🤗🤗🙂🙂

    • @codeitup
      @codeitup  2 роки тому

      Most welcome Saurabh.. Keep learning😊

  • @MovieOk-p8q
    @MovieOk-p8q 2 місяці тому

    Thanku sir.❤ Isko hm function me bi likh skte hai. Apne easily bta diya. Ab me exam me function me likh dunga 😅

  • @Helly04
    @Helly04 Рік тому +3

    MY try-
    a=input("enter string:")
    if (a[::-1]==a):
    print("PALINDROME")
    else:
    print("Not a palindrome")

  • @sumitbangra8359
    @sumitbangra8359 3 роки тому +1

    really a best explaination ..........thankuuuuuuu sssssiirr🥰🥰🥰👍👍👍

    • @codeitup
      @codeitup  3 роки тому

      Most welcome Sumit!

  • @SarojKumar-rc6lw
    @SarojKumar-rc6lw 8 місяців тому

    Thank you sir, it's really helpful

    • @codeitup
      @codeitup  8 місяців тому

      You are most welcome Saroj!

  • @vish7091
    @vish7091 3 роки тому +1

    🔥👍🔥

  • @chromelearning
    @chromelearning 3 роки тому +1

    thank you so much sir it help me❤️

  • @khushikushwaha7659
    @khushikushwaha7659 3 роки тому

    U r the best tutor thanku so much .

    • @codeitup
      @codeitup  3 роки тому

      Most welcome Khushi 😊

  • @mcpedroid2866
    @mcpedroid2866 4 роки тому +1

    Best Channel!

    • @codeitup
      @codeitup  4 роки тому

      Keep learning keep supporting...

  • @eesnehhil
    @eesnehhil 3 роки тому +1

    Thank you so much sir.
    It was really helpful!

    • @codeitup
      @codeitup  3 роки тому +1

      Glad to help you Snehil!

  • @meow-rd6op
    @meow-rd6op 3 роки тому +1

    Nice videos👌

    • @codeitup
      @codeitup  3 роки тому

      Thank you so much Abhishek 😀

  • @samsxedits
    @samsxedits 4 місяці тому

    We can write b=a[::-1] as well to reverse the string.

  • @shivanshtripathi03
    @shivanshtripathi03 3 роки тому

    Thank you sir it is very very easy.

  • @AshishYadav-hh5tb
    @AshishYadav-hh5tb 4 роки тому +1

    thanku sir ......pls complete this python series

  • @maheshappaji1273
    @maheshappaji1273 3 роки тому

    Make a video on sentence palindrome
    Every one is doing word palindrome
    Wts new about ur video
    Be the change

  • @varsha3088
    @varsha3088 Рік тому

    Good work sir ❤

  • @aryansrivastava2922
    @aryansrivastava2922 Рік тому +1

    Sir i which campany you are working

  • @tanveerbibi6474
    @tanveerbibi6474 Рік тому

    Very nice video hai❤❤❤❤

  • @akhiltest3066
    @akhiltest3066 4 роки тому +1

    Awesome explanation

  • @adityaanurag2102
    @adityaanurag2102 4 роки тому +1

    Great work Sir 🔥👍

    • @codeitup
      @codeitup  4 роки тому

      Thanks Aditya. May I ask you to share this channel with you friends..

  • @vijaysahal4556
    @vijaysahal4556 4 роки тому +1

    superb sir 👍👍👍👍

  • @meenalohani
    @meenalohani 4 роки тому

    Thank you siŕ

  • @adnankauser383
    @adnankauser383 Рік тому

    sir loop use karke ek video bnaye sir

  • @kanchansil7168
    @kanchansil7168 3 роки тому

    I have subscribed you... very beautiful explanation thank you sir. We want more videos on python.

    • @codeitup
      @codeitup  3 роки тому

      Thanks and welcome.. Will keep uploading.

  • @raghavaggarwal8565
    @raghavaggarwal8565 9 місяців тому

    If the string is Madam then the reverse will be madaM
    these strings are not equal but are palandromes
    this is a drawback of the code u told here sir

  • @techlookout3461
    @techlookout3461 Рік тому +1

    Sir, Can we use this program insread? ↓↓↓↓
    a = input("Enter a String")
    x = a[:: -1]
    if a == x:
    print("Palindrome")
    else:
    print("Not Palindrome")
    *************************
    Since its working the same without (-1) in the starting of 2nd line.

  • @dwaynerock5520
    @dwaynerock5520 Рік тому +1

    Sir, iski space complexity kyaa hogi??

  • @codewithashuu
    @codewithashuu 7 місяців тому

    thank you sir😌

  • @hector9562
    @hector9562 2 роки тому

    Thank you sir

  • @iharshgarg
    @iharshgarg 2 роки тому

    shaandar

  • @neharikapuri7394
    @neharikapuri7394 4 роки тому

    thank you so much sir..

    • @codeitup
      @codeitup  4 роки тому

      Most welcome Neharika!

  • @kanduladivya5804
    @kanduladivya5804 3 роки тому

    u write programs in a simple manner,really horrible.thanku sooomuch

  • @shitalrathore3488
    @shitalrathore3488 3 роки тому

    Sir what if question ask not to use string slice
    Sir please make video on it...

  • @PIYUSH-lz1zq
    @PIYUSH-lz1zq 3 роки тому

    sir , coding round ke question ke upar videos ...

  • @rabirajpradhan1619
    @rabirajpradhan1619 4 роки тому +1

    Hello sir.... I have a doubt..... Can we input a integer number and use this slicing method for chck palindrome????

    • @codeitup
      @codeitup  4 роки тому +1

      No, for checking an integer for palindrome we have another program:ua-cam.com/video/fW34eJhh7Fw/v-deo.html

  • @nikhilgupta6062
    @nikhilgupta6062 4 роки тому +2

    Sir using loop bta do

    • @codeitup
      @codeitup  4 роки тому

      a=input("Enter String")
      i=0
      j=len(a)-1
      flag=0
      while(i

  • @hariommishra9597
    @hariommishra9597 3 роки тому

    Sir can this program be done without using string slice..if so please do it in reply section and make ensure that it is correct.

  • @gyanodayvidyalaya
    @gyanodayvidyalaya 4 роки тому

    Sir you tell how b is storing the variable again and again but it is a variable here

    • @codeitup
      @codeitup  4 роки тому

      A variable is one which stores the value and the value contained in it can be changed again and again as per requirement..

  • @muzananadeem9990
    @muzananadeem9990 Рік тому

    can we write it as b=a[ 1 : : 1] ..........is it wrong and if it is wrong then kindly explain how?

  • @proxi444
    @proxi444 3 роки тому

    Sir mene if ke baad print "Palindrome" likha, fir enter daba rha hu toh error aa rha hai, else Wala nahi likh paa rha hu, help Sir!

  • @devanshgoel1407
    @devanshgoel1407 4 роки тому +1

    hi,
    pls make the above program using for loop.

    • @codeitup
      @codeitup  4 роки тому +2

      Hi Anjana, The program is as under:
      string = input("Please enter your own String : ")
      str = ""
      for i in string:
      str = i + str
      print("String in reverse Order : ", str)
      if(string == str):
      print(" Palindrome String")
      else:
      print("Not a Palindrome String")

  • @ashwinschannel5053
    @ashwinschannel5053 3 роки тому

    Sir instead of string pls explain for a given number..

  • @MAYANKGUPTA-wl2wq
    @MAYANKGUPTA-wl2wq 3 роки тому

    Sir, how can we check a int is a prime number or not.

  • @chitranshkhare2029
    @chitranshkhare2029 3 роки тому

    Sir agar enter your string ke baad ham colon sign nahi lagaye to ye execute nhi hota kyu

    • @codeitup
      @codeitup  3 роки тому

      Aisa nahi hai, wo meri aadat hai dene ki, to make message good looking.

  • @jeel-doshi
    @jeel-doshi 4 роки тому

    Hello,
    I have one doubt... If I enter Madam as input then it will show not palindrome(bcoz 1st M is capital nd last one is not) but in fact it should show palindrome than what's the solution??

    • @codeitup
      @codeitup  4 роки тому +1

      Just you can convert the input into lower case and now this lowercase string may be checked for palindrome.

    • @jeel-doshi
      @jeel-doshi 4 роки тому

      Ok thank you and sir ur work is really really helpful.... I loved it.
      To be honest I never watch any videos more than 2 Or 3 but I have reached 55th of urs.... It is really appriciable.

  • @leemabandelu1917
    @leemabandelu1917 4 роки тому

    sir i tried using for loop to reverse it ,{for in range(len(a)-1,-1.-1)}
    reverse toh hoo raha hai lekin the original and the reversed string is not equal , soo not palindrome print ho raha hai.

    • @DK-js8cz
      @DK-js8cz 2 роки тому

      Convert the input string in to either lower case or upper case.

  • @abhi-mini
    @abhi-mini 4 роки тому +1

    Sir 1 program bata dijiye to find second largest no in a list

    • @codeitup
      @codeitup  4 роки тому

      In a day or two, I will upload this program.

    • @codeitup
      @codeitup  4 роки тому

      The program you requested for :)
      ua-cam.com/video/DHiU33KBeNw/v-deo.html

  • @debojitdas1813
    @debojitdas1813 Рік тому

    But aisa toh list mei hota hai na sir

  • @parthrajput7693
    @parthrajput7693 3 роки тому

    Sir can u plzz tell from where to learn the basic plzz sir
    Any book or pdf ....?

    • @codeitup
      @codeitup  3 роки тому +1

      There is no full proof and good book for Python as of now as per my view. You may visit w3schools.com for notes.

    • @parthrajput7693
      @parthrajput7693 3 роки тому

      Sir now I m watching all ur videos
      That 179 videos
      They are too good sir .

    • @parthrajput7693
      @parthrajput7693 3 роки тому

      And sir thanku for ur reply🙏

  • @aviralgupta4378
    @aviralgupta4378 3 роки тому +2

    Sir yeh chal nhi rha hai

  • @gyanodayvidyalaya
    @gyanodayvidyalaya 4 роки тому

    Sir how line 2 again and again running

    • @codeitup
      @codeitup  4 роки тому +1

      Because loop is executed again and again till the condition is true.

    • @gyanodayvidyalaya
      @gyanodayvidyalaya 4 роки тому

      But sir here I can't see any loop

  • @ShadabAnsari-dt4ni
    @ShadabAnsari-dt4ni 3 роки тому

    What if someone put
    Madam
    Not :- medam
    ????

  • @sanskarshendge6233
    @sanskarshendge6233 3 роки тому

    a=input("Enter the string")
    b=a[-1::-1]
    if a==b:
    print("the given word is palindrom")
    else:
    print("sorry")
    #its not working

  • @aryansrivastava2922
    @aryansrivastava2922 Рік тому

    Sir whats your job

  • @anubhavjotkaur4283
    @anubhavjotkaur4283 3 роки тому

    Sir I'm getting an error in the b statement in the double colon. What shud I do?

  • @hector9562
    @hector9562 2 роки тому

    How can join ur course??

    • @codeitup
      @codeitup  2 роки тому

      For any query please mail to codeitupofficial@gmail.com!

  • @vishwajeetrupnar7441
    @vishwajeetrupnar7441 4 роки тому

    Aree program kaam nahi kar raha

    • @codeitup
      @codeitup  4 роки тому

      Its not so Vishwajeet. See the video at 5:09, I have run the program and it is working perfectly. Kindly cross check your program.

  • @isbahahmed4516
    @isbahahmed4516 3 роки тому +1

    Thank you sir for this program and nice explanation also 🙏👍🏻🙏👍🏻

    • @codeitup
      @codeitup  3 роки тому +1

      My pleasure Isbah!

  • @devikaa.l9946
    @devikaa.l9946 3 роки тому

    Thank u sir

    • @codeitup
      @codeitup  3 роки тому

      Most welcome Devika!

  • @marufmorshed3586
    @marufmorshed3586 4 роки тому

    Thanks brother