【发布时间】:2020-06-18 15:58:12
【问题描述】:
我无法在 Python3 中将 these Unicode emojis 与字符串连接起来(以发送 Pushwoosh 通知)。
我将表情符号定义为 Unicode 变量:
stick_out_tongue = u'U+1F61C'
然后像这样连接字符串:
message = ' Message here...'
message = stick_out_tongue + message
但输出看起来像:
'U+1F61C Message here...'
请帮忙
【问题讨论】:
-
这只是一个带有'U'、'+'等的字符串。你可能在
'\U0001f61c'之后。 -
您遇到的错误是什么?
-
我敢肯定这个问题之前已经被问过,不管怎样,但我现在找不到合适的副本。不过,This thread 是相关的。
标签: python-3.x unicode emoji