相关文章推荐
傻傻的南瓜  ·  Understanding the app ...·  1 月前    · 
奋斗的山楂  ·  怎么在页面didMou ...·  1 年前    · 
低调的饭盒  ·  python修改json - CSDN文库·  1 年前    · 
帅气的小熊猫  ·  Ubuntu ...·  1 年前    · 
学习
实践
活动
专区
工具
TVP
写文章
专栏首页 python3 python判断输入的内容是否是emoj
1 0

海报分享

python判断输入的内容是否是emoj

python判断输入的内容是否是emoji表情:

"""
@描述           根据传入的content,判断是否是emoji字符。
@return         True是emoji,False不是True是emoji。
@staticmethod
def isEmoji(content):
    if not content:
        return False
    if u"\U0001F600" <= content and content <= u"\U0001F64F":
        return True
    elif u"\U0001F300" <= content and content <= u"\U0001F5FF":
        return True
    elif u"\U0001F680" <= content and content <= u"\U0001F6FF":
        return True
    elif u"\U0001F1E0" <= content and content <= u"\U0001F1FF":
        return True