mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Updated Code snippets (markdown)
parent
ce008f3696
commit
28ded607fb
1 changed files with 4 additions and 6 deletions
|
@ -416,12 +416,10 @@ def flag(code):
|
||||||
code = code.upper()
|
code = code.upper()
|
||||||
return chr(ord(code[0]) + OFFSET) + chr(ord(code[1]) + OFFSET)
|
return chr(ord(code[0]) + OFFSET) + chr(ord(code[1]) + OFFSET)
|
||||||
|
|
||||||
>>> flag('de')
|
>>> flag('un')
|
||||||
'🇩🇪'
|
'🇺🇳'
|
||||||
>>> flag('us')
|
>>> flag('eu')
|
||||||
'🇺🇸'
|
'🇪🇺'
|
||||||
>>> flag('ua')
|
|
||||||
'🇺🇦'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in a new issue