sing Python 3.5!!! Substring and Palindrome: Write a program that asks the user for a three-letter substring. The program should then proceed to read the file strings.bxt. Each line in strings txt will contain a string. Your program should then test to see how many non- overlapping occurrences of the three-letter substring occur in that string and test whether the string is a palindrome You can read about Palendromes here) The program should then proceed to create an output file string stats.bxt, which contains the original data on one line and the number of substring occurrences and palindrome test results on the next. After that, the file should have one blank line, and then the output process should repeat. Input File is formatted such that each line is a string to be tested. Leading and trailing whitespace for each line must be deleted before processing. Output format is: Original data without ueading or trailing whitespace \"n\" Sub Stdog Count str(count) is or not Palindrome \"In\'. Note: Input files should not end with a newline. The last line in the input file should not have a newline, as having a new line will likely cause your program to check a blank line or a line with just a newline. Note: The program should handle EileNotFoundError, See Pre-Lab for more on this. Required Design Scheme: Write a function isPalindrome(bxt) o This function check if the string passed in is a palindrome, from the sample text file below, an example parameter is isPalendrome(racecar). o Returns True if it is a palindrome. o Returns False if not Write a function getPalindrome(bxt) o This function calls isPalindrome(txt) to check if the string is palindrome o It returns Is Palindrome\", when the string is a palindrome. o Returns \"Not Palindrome\", when the string is not apalindrome. Write a function readEile(file name, target). o Takes in the file name and three letter substring o Opens the file o Creates the output data list o Close File. o Return output data Write a function write results(file name, output data) o Takes in the output file\'s name, and the output data. 
def isPalindrome(my_str)
    my_str = my_str.casefold()
    rev_str = reversed(my_str)
    if list(my_str) == list(rev_str):
        return true
    else:
        return false
 
 def getPalindrome(my_str):
    if isPalindomre(my_str):
        print \"Is_Palindrome\"
    else:
        print \"Not_Palindrome\"
 return
   
 def readFile(file_name,target):
    count = 0
    try:
        for line in open (file_name, \'r\'):
            output = output+line
            output = output+\"\ Sub_String_Count:\\t\"+line.count(target)+\"\\t\"getPalindrome(line)+\"\ \"
     except IOError:
 print \"Could not read file:\", file_name
 return
 output= \"\"
 def write_results(file_name,output_data):
    try:
        f= open(file_name,\"w+\")
        f.write(output_data))
        f.close
    except IOError:
 print \"Could not write file:\", file_name
    return
 main():
    print \"Please enter the 3 letter sub-string:\",
    substring = raw_input()
    readFile(\"sample.txt\",substring)
    write_results(\"output.txt\",output)