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
Thank you sir for making this so much easier..thank you so much🙂
Thanks shaily. Your support needed for the growth of this channel. Keep learning keep supporting.
@@codeitup a
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.
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
Sure ! Thanks for the complement.
Best ever in short,,, I ever seen
Appreciate your work
Thanks Anupam!
Sir, your way of teaching methods and explanation is very useful for me..
Thank for making the videos for us..
Glad to hear that!
Thanku sir very useful c programming language the best important trick
My pleasure😊
You have excellent teaching skill, sir and thank you so much for providing useful contains.
So nice of you🙂
Very nice explanation sir 👍👍
Thanks and welcome🙂
Thank you sir for makeing so much easy program
Thank you sir . It's easy to understand 🤗🤗🙂🙂
Most welcome Saurabh.. Keep learning😊
Thanku sir.❤ Isko hm function me bi likh skte hai. Apne easily bta diya. Ab me exam me function me likh dunga 😅
MY try-
a=input("enter string:")
if (a[::-1]==a):
print("PALINDROME")
else:
print("Not a palindrome")
really a best explaination ..........thankuuuuuuu sssssiirr🥰🥰🥰👍👍👍
Most welcome Sumit!
Thank you sir, it's really helpful
You are most welcome Saroj!
🔥👍🔥
thank you so much sir it help me❤️
U r the best tutor thanku so much .
Most welcome Khushi 😊
Best Channel!
Keep learning keep supporting...
Thank you so much sir.
It was really helpful!
Glad to help you Snehil!
Nice videos👌
Thank you so much Abhishek 😀
We can write b=a[::-1] as well to reverse the string.
Thank you sir it is very very easy.
thanku sir ......pls complete this python series
Pls go with oop concept
For sure...
Make a video on sentence palindrome
Every one is doing word palindrome
Wts new about ur video
Be the change
Good work sir ❤
Sir i which campany you are working
Very nice video hai❤❤❤❤
Thanks!
Awesome explanation
Keep watching :)
Great work Sir 🔥👍
Thanks Aditya. May I ask you to share this channel with you friends..
superb sir 👍👍👍👍
Thanks again🙂
Thank you siŕ
Welcome 😊
sir loop use karke ek video bnaye sir
I have subscribed you... very beautiful explanation thank you sir. We want more videos on python.
Thanks and welcome.. Will keep uploading.
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
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.
Yes
Sir, iski space complexity kyaa hogi??
thank you sir😌
Welcome !
Thank you sir
Most welcome😊
shaandar
Thanks!
thank you so much sir..
Most welcome Neharika!
u write programs in a simple manner,really horrible.thanku sooomuch
Horrible????😱
Sir what if question ask not to use string slice
Sir please make video on it...
sir , coding round ke question ke upar videos ...
Hello sir.... I have a doubt..... Can we input a integer number and use this slicing method for chck palindrome????
No, for checking an integer for palindrome we have another program:ua-cam.com/video/fW34eJhh7Fw/v-deo.html
Sir using loop bta do
a=input("Enter String")
i=0
j=len(a)-1
flag=0
while(i
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.
Sir you tell how b is storing the variable again and again but it is a variable here
A variable is one which stores the value and the value contained in it can be changed again and again as per requirement..
can we write it as b=a[ 1 : : 1] ..........is it wrong and if it is wrong then kindly explain how?
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!
hi,
pls make the above program using for loop.
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")
Sir instead of string pls explain for a given number..
Sir, how can we check a int is a prime number or not.
Sir agar enter your string ke baad ham colon sign nahi lagaye to ye execute nhi hota kyu
Aisa nahi hai, wo meri aadat hai dene ki, to make message good looking.
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??
Just you can convert the input into lower case and now this lowercase string may be checked for palindrome.
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.
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.
Convert the input string in to either lower case or upper case.
Sir 1 program bata dijiye to find second largest no in a list
In a day or two, I will upload this program.
The program you requested for :)
ua-cam.com/video/DHiU33KBeNw/v-deo.html
But aisa toh list mei hota hai na sir
Sir can u plzz tell from where to learn the basic plzz sir
Any book or pdf ....?
There is no full proof and good book for Python as of now as per my view. You may visit w3schools.com for notes.
Sir now I m watching all ur videos
That 179 videos
They are too good sir .
And sir thanku for ur reply🙏
Sir yeh chal nhi rha hai
Sir how line 2 again and again running
Because loop is executed again and again till the condition is true.
But sir here I can't see any loop
What if someone put
Madam
Not :- medam
????
a=input("Enter the string")
b=a[-1::-1]
if a==b:
print("the given word is palindrom")
else:
print("sorry")
#its not working
its wokrs in ide but not in pycharm
@@sanskarshendge6233 try if a[::]==a[::-1]
Sir whats your job
Sir I'm getting an error in the b statement in the double colon. What shud I do?
How can join ur course??
For any query please mail to codeitupofficial@gmail.com!
Aree program kaam nahi kar raha
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.
Thank you sir for this program and nice explanation also 🙏👍🏻🙏👍🏻
My pleasure Isbah!
Thank u sir
Most welcome Devika!
Thanks brother
Welcome🙂