Python: Create strikethrough / strikeout / overstrike string type

后端 未结 3 1670
灰色年华
灰色年华 2021-01-02 21:46

I would appreciate some help in creating a function that iterates through a string and combines each character with a strikethrough character (\\u0336). With the output bein

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-02 22:33

    def strike(text):
        result = ''
        for c in text:
            result = result + c + '\u0336'
        return result
    

    Cool effect.

提交回复
热议问题