Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

superscript print python

print("Superscript: xu00b2")
Comment

print subscript and superscript python

# subscript
print(u'Hu2082SOu2084')  # H₂SO₄
  
# superscript
print("xu00b2 + yu00b2 = 2")  # x² + y² = 2
Comment

superscript python

# function to convert to superscript
def get_super(x):
    normal = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-=()"
    super_s = "ᴬᴮᶜᴰᴱᶠᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾQᴿˢᵀᵁⱽᵂˣʸᶻᵃᵇᶜᵈᵉᶠᵍʰᶦʲᵏˡᵐⁿᵒᵖ۹ʳˢᵗᵘᵛʷˣʸᶻ⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾"
    res = x.maketrans(''.join(normal), ''.join(super_s))
    return x.translate(res)
  
# display superscipt
print(get_super('GeeksforGeeks')) #ᴳᵉᵉᵏˢᶠᵒʳᴳᵉᵉᵏˢ
Comment

PREVIOUS NEXT
Code Example
Python :: linear search in python 
Python :: pandas drop empty rows 
Python :: how to increase height of entry in tkinter 
Python :: divide two columns pandas 
Python :: convert a dictionary into dataframe python 
Python :: how to convert month to number in python 
Python :: pandas sort values reset index 
Python :: add authorization header in python requests 
Python :: pydrive list folders 
Python :: business logic in django 
Python :: print python path variable 
Python :: get list of all files in folder and subfolders python 
Python :: center buttons tkinter 
Python :: fibonacci python 
Python :: python r2 score 
Python :: cv2 image object to base64 string 
Python :: godot code for movement for topdown game 
Python :: python datetime strptime hour minute second 
Python :: python fdr correction 
Python :: import all images from folder python 
Python :: get all file names in a folder python 
Python :: python program that takes command line arguments as input and print the number of arguments 
Python :: remove unicode from string python 
Python :: python degrees to radians 
Python :: turn off pycache python 
Python :: remove minimize and maximize and cancle button python pyqt5 
Python :: print whole dataframe python 
Python :: python matplotlib inline 
Python :: typage in python 
Python :: get parameters flask 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =