You are viewing a single comment's thread. Return to all comments →
solution in python 2
def funnyString(s): b=list(map(lambda x, y:abs(ord(x)-ord(y)),s[0:len(s)-1],s[1:])) if b==b[::-1]: return "Funny" else: return "Not Funny"
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →
solution in python 2
def funnyString(s): b=list(map(lambda x, y:abs(ord(x)-ord(y)),s[0:len(s)-1],s[1:])) if b==b[::-1]: return "Funny" else: return "Not Funny"