updated chapter 4 and appendix-A files

This commit is contained in:
Luciano Ramalho
2020-01-22 22:52:23 -03:00
parent a1d6c125bf
commit 49f52e29c7
25 changed files with 5219 additions and 10 deletions

12
04-text-byte/skin.py Executable file
View File

@@ -0,0 +1,12 @@
from unicodedata import name
SKIN1 = 0x1F3FB # EMOJI MODIFIER FITZPATRICK TYPE-1-2 # <1>
SKINS = [chr(i) for i in range(SKIN1, SKIN1 + 5)] # <2>
THUMB = '\U0001F44d' # THUMBS UP SIGN 👍
examples = [THUMB] # <3>
examples.extend(THUMB + skin for skin in SKINS) # <4>
for example in examples:
print(example, end='\t') # <5>
print(' + '.join(name(char) for char in example)) # <6>