create account

Python Program to Check Whether a String is Palindrome or Not by python-dev

View this thread on: hive.blogpeakd.comecency.com
· @python-dev ·
$0.41
Python Program to Check Whether a String is Palindrome or Not
``` 
# Program to check if a string is palindrome or not

my_str = 'aIbohPhoBiA'

# make it suitable for caseless comparison
my_str = my_str.casefold()

# reverse the string
rev_str = reversed(my_str)

# check if the string is equal to its reverse
if list(my_str) == list(rev_str):
   print("The string is a palindrome.")
else:
   print("The string is not a palindrome.")
 ```
👍  , ,
properties (23)
authorpython-dev
permlinkpython-program-to-check-whether-a-string-is-palindrome-or-not
categorypython-dev
json_metadata{"tags":["python-dev"],"app":"hiveblog/0.1","format":"markdown"}
created2020-03-22 11:46:51
last_update2020-03-22 11:46:51
depth0
children1
last_payout2020-03-29 11:46:51
cashout_time1969-12-31 23:59:59
total_payout_value0.204 HBD
curator_payout_value0.204 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length376
author_reputation5,457,648,648,750
root_title"Python Program to Check Whether a String is Palindrome or Not"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,538,029
net_rshares1,320,555,695,715
author_curate_reward""
vote details (3)
@steemcleaners ·
$0.66
[Source](https://www.programiz.com/python-programming/examples/palindrome)
[Plagiarism](http://www.plagiarism.org/plagiarism-101/what-is-plagiarism/) is the copying & pasting of others work without giving credit to the original author or artist. Plagiarized posts are considered fraud and violate the intellectual property rights of the original creator. 

Fraud is discouraged by the community and may result in the account being Blacklisted.
👍  
properties (23)
authorsteemcleaners
permlinkq7ltq0
categorypython-dev
json_metadata{"links":["https://www.programiz.com/python-programming/examples/palindrome","http://www.plagiarism.org/plagiarism-101/what-is-plagiarism/"],"app":"hiveblog/0.1"}
created2020-03-22 16:56:27
last_update2020-03-22 16:56:27
depth1
children0
last_payout2020-03-29 16:56:27
cashout_time1969-12-31 23:59:59
total_payout_value0.330 HBD
curator_payout_value0.331 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length443
author_reputation2,789,224,428,782,668
root_title"Python Program to Check Whether a String is Palindrome or Not"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,541,593
net_rshares2,013,010,725,185
author_curate_reward""
vote details (1)