Hearts emojis
Created on Jan. 22, 2018 by Julien Palard
Find all the emojis containing a heart (usefull on social networks, I bet).
Given almost any character in almost any alphabet has an attributed number in Unicode, you could access them using the range and the chr functions.
Using the
unicodedata
module, specifically its name
function, you could filter them to
keep only those having 'HEART' in their name. Print characters all in a
single line without any separator (not their names).
1 2 3 |
|
Beware, unicodedata.name
throws an exception when a character has no
name, give it an empty second parameter to avoid it.
There's no corrections yet, hit the `Submit` button to send your code to the correction bot.
Keyboard shortcuts:
- Ctrl-Enter: Send your code to the correction bot.
- Escape: Get back to the instructions tab.