0
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

I get output "ou"
What happened to the rest "ouuo"?

please, someone I need some assistance

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Kolz
0

I get output "ou"
What happened to the rest "ouuo"?

please, someone I need some assistance

What was your input?

0

His input was probably ouuo.
Well I figured out how to do the odd one without using break... I'm sure the even one is similar to the odd one =].

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.