UTF-8 Characters in Python

Project #1

If your system supports UTF-8, print all of the uppercase and lowercase Greek letters. (There are 24 characters in the modern Greek alphabet.)

Project #2

Project #1 except use the Russian alphabet.

What about other alphabets? Math symbols? Etc.

For more about math symbols, click HERE .

Example Output

default encoding is utf-8 degree : ° delta : Δ epsilon : ε mu : μ omega : Ω sigma : σ sigmacap : Σ theta : ϴ Δt = 100

Example Python Code

#!/usr/bin/python # ================================================================= # useful UTF-8 characters in Python # # for more information: # pythonforundergradengineers.com/unicode-characters-in-python.html # ================================================================= import sys # ---- system default encoding print(f'default encoding is {sys.getdefaultencoding()}') # ---- UTF-8 characters epsilon = '\u03b5' degree = '\u00b0' delta = '\u0394' mu = '\u03bc' omega = '\u03a9' sigma = '\u03c3' sigmacap = '\u03A3' theta = '\u03f4' print() print(f'degree : {degree}') print(f'delta : {delta}') print(f'epsilon : {epsilon}') print(f'mu : {mu}') print(f'omega : {omega}') print(f'sigma : {sigma}') print(f'sigmacap : {sigmacap}') print(f'theta : {theta}') print() start = 200 end = 300 print(f'\u0394t = {end - start}')

To see more about UTF-8 click HERE