I found this under Windows Python3 >>> l="http://f/" >>> l[-1] is not '/' False >>> and this under Linux Python3 >>> l = "http://ff.f/" >>> l[-1] '/' >>> l[-1] is not '/' True It's Looks like a python bug?