Hearts emojis

Created 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 the Unicode table (from 1 to 230000), 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).

mbp|~-$ python3 solution.py
[Some hearts and some undisplayable characters as your terminal don't know how to render them]

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.

See solutions