In this Kata, you will be given a string and your task will be to return the length of the longest prefix that is also a suffix. A prefix is the start of a string while the suffix is the end of a string.  For instance, the prefixes of the string `"abcd"` are `["a","ab","abc"]`. The suffixes are `["bcd", "cd", "d"]`. You should not overlap the prefix and suffix.
```Haskell
for example:
solve("abcd") = 0, because no prefix == suffix. 
solve("abcda") = 1, because the longest prefix which == suffix is "a".
solve("abcdabc") = 3. Longest prefix which == suffix is "abc".
solve("aaaa") = 2. Longest prefix which == suffix is "aa". You should not overlap the prefix and suffix
solve("aa") = 1. You should not overlap the prefix and suffix.
solve("a") = 0. You should not overlap the prefix and suffix.
```
All strings will be lowercase and string lengths are `1 <= length <= 500`
More examples in test cases. Good luck!
import math

# The function that will check a prefix and a suffix
def prefix_suffix_check(string, indexIn):
    return string[:indexIn] == string[(indexIn) * -1 : ]

def solve(initial_string):
    
    # Halves and floors the array size
    half_array_size = int(math.floor(len(initial_string) / 2))
    
    # A revese for loop for checking the middle to outer
    for x in range(half_array_size, 0, -1):
        # If the suffix and prefix are equal return the x
        if (prefix_suffix_check(initial_string, x) == True):
            return x
    
    # Else return 0
    return 0

import math

# The function that will check a prefix and a suffix
def prefix_suffix_check(string, indexIn):
    return string[:indexIn] == string[(indexIn) * -1 : ]

def solve(initial_string):
    
    # Halves and floors the array size
    half_array_size = int(math.floor(len(initial_string) / 2))
    
    # A revese for loop for checking the middle to outer
    for x in range(half_array_size, 0, -1):
        # If the suffix and prefix are equal return the x
        if (prefix_suffix_check(initial_string, x) == True):
            return x
    
    # Else return 0
    return 0
