human
Solve in Python:
Given a non-empty string s, you may delete at most one character.  Judge whether you can make it a palindrome.

Example 1:

Input: "aba"
Output: True


Example 2:

Input: "abca"
Output: True
Explanation: You could delete the character 'c'.


Note:

The string will only contain lowercase characters a-z.
The maximum length of the string is 50000.
assistant
#Here is the Python program you requested.

class Solution:
     def validPalindrome(self, s):
         """
         :type s: str
         :rtype: bool
         """
         if s == s[::-1]:
             return True
         r = s[::-1]
         for i in range(0, len(s)):
             if r[i] == s[i]:
                 continue
             else:
                 break
         r = r[:i] + r[i+1:]
         if r == r[::-1]:
             return True
         s = s[:i] + s[i+1:]
         return s == s[::-1]