Check if a List is sorted in Python

In the previous article, we saw how we can obtain a count of all the distinct elements of a list. Now we will look at how we can implement a program to Check if a List is sorted in Python. We need to check if the list is in non-decreasing order, as in every element … Read more

Check for Palindrome in Python

In the previous article we explored pattern searching in Python, on this article we will see how we can check for Palindrome in Python logic. Before we delve further, think of the date 10-02-2001 which can be expressed as 10022001. From either side, left to right or right to left we arrive at the same … Read more