Skip to content

Instantly share code, notes, and snippets.

@ptmcg
Last active February 13, 2022 18:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptmcg/bf35d5ada416080d481d789988b6b466 to your computer and use it in GitHub Desktop.
Save ptmcg/bf35d5ada416080d481d789988b6b466 to your computer and use it in GitHub Desktop.
Hello, World rendered in a variety of Unicode characters
def ๐š‘๐“ฎ๐–‘๐’๐‘œ():
try:
๐”ฅe๐—…๐•๐š˜๏ธด = "Hello"
๐•จ๐”ฌr๐“ตแตˆ๏นŽ = "World"
แต–๐–—๐ข๐˜ฏ๐“ฝ(f"{๐—ต๏ฝ…๐“ต๐”ฉยบ_}, {๐–œโ‚’๐’“lโ…†๏ธด}!")
except ๐“ฃ๐•ชแต–๏ฝ…๐–ค๐—ฟแตฃ๐–”๐š› as โ…‡๐—‘c:
๐’‘rโ„นโ‚™โ‚œ("failed: {}".๐•—๐—ผสณแตยช๏ฝ”(แต‰๐ฑ๐“ฌ))
# snippet from unittest/util.py
_๐“Ÿโ…ฌ๐– ๐™ฒ๐—˜โ„‹๐’ชLแดฐ๐‘ฌ๐•ฝ๏น๐•ท๐”ผ๐—ก = 12
def _๐”ฐสฐ๐“ธสณ๐•ฅ๐™š๐‘›(๐”ฐ, p๐‘Ÿ๐”ข๏ฌ๐–๐•๐šŽ๐‘›, ๏ฝ“แตค๐‘“๐—ณ๐—‚๐‘ฅ๐—นโ‚‘๐š—):
หข๐—ธ๏ฝ‰๐—ฝ = ๐ฅ๏ฝ…๐˜ฏ(๐–˜) - ๏ฝr๐šŽ๐–‹๐ขx๐—…แต‰๐“ท - ๐’”๐™ช๏ฌ€๏ฝ‰๐˜…๐—น๐™šโ‚™
if s๏ฝ‹i๐˜ฑ > _๐๐—Ÿ๐– ๐˜Š๐™ดH๐•บ๏ผฌ๐•ฏ๐™€๐˜™๏นL๐”ˆ๐’ฉ:
๐˜ด = '%s[%d chars]%s' % (๐™จ[:๐˜ฑ๐ซ๐•–๐‘“๐•š๏ฝ˜โ„“๐’†๐•Ÿ], โ‚›๐š”๐’Šp, ๐“ผ[๐“๐’†๐–“(๐šœ) - ๐™จ๐šž๐’‡๏ฌx๐™กแต‰๐˜ฏ:])
return โ‚›
if _๏ธดโฟ๐“ช๐‘š๐•–__ == "__main__":
๐’‰eโ„“หก๐—ˆ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment