**UPDATE:** *Thanks to the answers below, I now know that it is an error in the function and has nothing to do with Python's behavior. (My foul) I've since changed the title from "Could Python skip spaces when iterating through a string?" to "What is Wrong with this Function?" so future readers will know that the answers they'll find here pertain to the function, not to Python.*

I made a function in Python that determines whether a string is a Palindrome or not. Basically, it iterates from the left and right simultaneously, and checks if any characters are not equal. If so, it returns False. After it reaches the middle, it stops iterating and returns True.

```
def isPalindrome(string):
    l = 0
    r = -1
    while(l < r+2):
        if string[l] != string[r]:
            return False
        l += 1
        r -= 1

    return True

palin = raw_input("Enter string: ")
if(isPalindrome(palin)):
    print "\""+palin+"\"","is a Palindrome."
else:
    print "\""+palin+"\"","isn't a Palindrome."

```

It works, but for some reason it also identifies strings like 'pythonnoh ty p' as a Palindrome. Although sometimes this may be a good thing, I'm wondering why the function appears to skip the spaces in the string. It should return False since ' ' does not equal 'y', but it doesn't. 

Is there a problem in my code or is it a behavior of Python?