
-----------------------------------
mms6
Tue Oct 27, 2009 1:51 am

Even Palindromes Help
-----------------------------------
[code]def get_even_palindrome_at(user_input, index):
    user_input = user_input.lower()
    user_input = remove_non_words(user_input)
    
    start_index, end_index = index, index
    
    while start_index >= 0 and end_index < len(user_input): 
        if user_input[start_index] == user_input[end_index]: 
            start_index -= 1
            end_index += 1
        else:
            break

    result = "" 
    count_index = start_index
    
    while count_index < end_index:
        result += user_input[count_index]
        count_index = count_index + 1
    return result[/code]




I get output "ou" from the Python Shell
What happened to the rest "ouuo"?

please, someone I need some assistance

-----------------------------------
A.J
Tue Oct 27, 2009 12:42 pm

RE:Even Palindromes Help
-----------------------------------
set start_index = 0 and end_index = len(user_input) after the first loop.

-----------------------------------
SNIPERDUDE
Tue Oct 27, 2009 1:05 pm

RE:Even Palindromes Help
-----------------------------------
Aibohphobia?

-----------------------------------
A.J
Tue Oct 27, 2009 6:30 pm

RE:Even Palindromes Help
-----------------------------------
no, I am sure that's not the case here...
