Making an emoji converter function!

 message = input(">")

def emojis_function(message):

    words=message.split(' ')

    emojis={

        ":)":":))",   #whenever :) will be written, it will be converted to :))     

        ":(":":(("

    }

    output=""

    for word in words:

        output+=emojis.get(word,word)+" "

    return output   # return used to get value from the function


print(emojis_function(message))

Comments

Popular posts from this blog

Guess game!

Path for chromedriver