You are given a message (text) that you choose to read in a mirror (weirdo). Return what you would see, complete with the mirror frame. Example:
Words in your solution should be left-aligned.
def mirror(text):
words=text.split()
max_w_len = len(max(words))
topbottom = "*"*(max_w_len+4)+'\n'
res = topbottom + \
''.join([ '* ' + w[::-1] + ' '*(max_w_len-len(w)) + ' *\n' for w in words ]) + \
topbottom[:-1]
return res