小编vai*_*haw的帖子

在Python中检查字符是全宽还是半宽

我想用Python检查字符是全宽还是半宽

string="??hallo"
for char in string:
    if( \uFF60- \u0f01  and \uFFE0-\uFFE6 ): print( char +"is fullwidth")
    elif(\uFF61-\uFFDC and \uFFE8-\uFFEE):print(char+ " is halfwidth")
Run Code Online (Sandbox Code Playgroud)

请帮我把这个伪代码改成真正的python代码.

python

4
推荐指数
2
解决办法
1430
查看次数

标签 统计

python ×1