astr = "madam"
alen= len(astr)

print astr == astr[::-1]
for x in range(alen/2):
    if not astr[x] == astr[alen-1-x]:
        print False 
        break
else:
    print True

eeb79884650c1c53f5ebbd399040504ab87a3526
astr = "madam"
alen= len(astr)

print astr == astr[::-1]
for x in range(alen/2):
    if not astr[x] == astr[alen-1-x]:
        print False 
        break
else:
    print True
