``` # 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.") ```
author | python-dev |
---|---|
permlink | python-program-to-check-whether-a-string-is-palindrome-or-not |
category | python-dev |
json_metadata | {"tags":["python-dev"],"app":"hiveblog/0.1","format":"markdown"} |
created | 2020-03-22 11:46:51 |
last_update | 2020-03-22 11:46:51 |
depth | 0 |
children | 1 |
last_payout | 2020-03-29 11:46:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.204 HBD |
curator_payout_value | 0.204 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 376 |
author_reputation | 5,457,648,648,750 |
root_title | "Python Program to Check Whether a String is Palindrome or Not" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 96,538,029 |
net_rshares | 1,320,555,695,715 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
xiguang | 0 | 311,370,701,773 | 100% | ||
ancient-light | 0 | 23,990,955,783 | 100% | ||
crypto.income | 0 | 985,194,038,159 | 100% |
[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.
author | steemcleaners |
---|---|
permlink | q7ltq0 |
category | python-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"} |
created | 2020-03-22 16:56:27 |
last_update | 2020-03-22 16:56:27 |
depth | 1 |
children | 0 |
last_payout | 2020-03-29 16:56:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.330 HBD |
curator_payout_value | 0.331 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 443 |
author_reputation | 2,789,224,428,782,668 |
root_title | "Python Program to Check Whether a String is Palindrome or Not" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 96,541,593 |
net_rshares | 2,013,010,725,185 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
adm | 0 | 2,013,010,725,185 | 9.5% |