Version Parser In Python Code For Palindrome