Python program to check palindrome one liner code #shorts #coding #programming

preview_player
Показать описание

A palindrome is a word, phrase, number, or other sequences of characters that reads the same backwards and forward. An example of a palindrome is the word "radar."

If you found this video useful please give it a thumbs up and subscribe to my channel! and If you have any questions regarding this video, please ask them in the comment section. thanks for watching! :)

Follow Us:

#shorts #coding #programming

DISCLOSURE: This video and description might contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

[Intro Song Credit]
Valence - Infinite [NCS Release]
Рекомендации по теме
Комментарии
Автор

Here's a oneliner using walrus & ternary operators:
print('Yes' if (x:=input())==x[::-1] else 'No')

solitary
Автор

n=int(input("Enter number:"))
temp=n
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
if(temp==rev):
print("The number is a palindrome!")
else:
print("The number isn't a palindrome!")


for finding number

sjtricks
Автор

Wif do you mean "one liner"? Kinda seems like 5 times more lines than 1

LiberMentis-LM
Автор

If upper, lower cases avoided how to write code?

naveenkumarg
Автор

Even a 12 class student know that it is very easy.. You just compare forward and reverse order(indexing) of words same and if they do out put is yes and else the answer is no..

Aditya-wjyi
Автор

Java programmers are crying… I am not java programmer, no i am not, surely i am not.






Ok i am…😢

captainjacksparrow