the-honk/school/a-level/homework/fundementals/making faces.py

11 lines
181 B
Python

mapping = {
':)': '🙂',
':(': '🙁'
}
text = input('Please enter some text: ')
for emoticon in mapping.keys():
text = text.replace(emoticon, mapping[emoticon])
print(text)