Getting emoji counts in a string in Python

后端 未结 0 1569
旧巷少年郎
旧巷少年郎 2021-02-19 12:05
def emoji_counter(string):
no_of_emojis = 0
for char in string:
    if char in emoji.UNICODE_EMOJI_ENGLISH:
        no_of_emojis += 1
return no_of_emojis
<
相关标签:
回答
  • 消灭零回复
提交回复
热议问题