Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Programming and Computer Science
How to check whether a string is odd palindrome in python?
Reply to thread
Message
[QUOTE="shivajikobardan, post: 6572523, member: 695701"] I am learning to code and 1 thing that surprises me is how do I internalize all the code? I understand the code. I know the algorithm as well. But I want to be able to solve any types of problems(related ones) after learning 1 code. How do I become able to do that? So for that I am first trying with palindrome program. Here is the palindrome program for even palindrome. [CODE] #palindrome checking str1="abba" for i in range(len(str1)//2): if(str1[i]==str1[len(str1)-i-1]): isPalindrome=True else: isPalindrome=False print(isPalindrome) [/CODE] Now I want to write code for odd palindrome. Don't show me code but show me direction or algorithm so that I can write code on my own. example of odd palindrome is abbcbba. We are using c as the middle point. [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Programming and Computer Science
How to check whether a string is odd palindrome in python?
Back
Top