⬅︎ Back to String comparison function in Python (alpha)
I love writing python oneliners :)".join([x[0]==x[1] and "-" or "*" for x in map(None, a, b)])in python2.5 you can use the trinary op to make it slightly more elegant
Comment
I love writing python oneliners :)
".join([x[0]==x[1] and "-" or "*" for x in map(None, a, b)])
in python2.5 you can use the trinary op to make it slightly more elegant