Python3實現英文字母轉換哥特式字型例項程式碼
阿新 • • 發佈:2020-09-02
WARNING:低技術力
自己無聊寫的
哥特字型是最好看的:
示例程式碼:
#!usr/bin/env python3 # -*- coding:UTF-8 -*- s=input() d={"A":'𝔄',"B":'𝔅',"C":'ℭ',"D":'𝔇',"E":'𝔈',"F":'𝔉',"G":'𝔊',"H":'ℌ',"I":'ℑ',"J":'𝔍',"K":'𝔎',"L":'𝔏',"M":'𝔐',"N":'𝔑',"O":'𝔒',"P":'𝔓',"Q":'𝔔',"R":'ℜ',"S":'𝔖',"T":'𝔗',"U":'𝔘',"V":'𝔙',"W":'𝔚',"X":'𝔛',"Y":'𝔜',"Z":'ℨ',"a":'𝔞',"b":'𝔟',"c":'𝔠',"d":'𝔡',"e":'𝔢',"f":'𝔣',"g":'𝔤',"h":'𝔥',"i":'𝔦',"j":'𝔧',"k":'𝔨',"l":'𝔩',"m":'𝔪',"n":'𝔫',"o":'𝔬',"p":'𝔭',"q":'𝔮',"r":'𝔯',"s":'𝔰',"t":'𝔱',"u":'𝔲',"v":'𝔳',"w":'𝔴',"x":'𝔵',"y":'𝔶',"z":'𝔷'} s1="" def BL(s): global s1 global d for a in s: try: v=d[a] except KeyError: v=a s1=s1+v return s1 s=BL(s) print(s)
總結
到此這篇關於Python3實現英文字母轉換哥特式字型的文章就介紹到這了,更多相關Python3英文字母轉哥特式字型內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!