有什么办法可以从pycharn中的输出中删除u

时间:2019-11-07 23:29:02

标签: python python-3.x

Macboook中Pycharm的输出中出现一些编码问题

我尝试更改Pycharm中解释器的编码,但无济于事。此问题仅在我的Macbook上存在pycharm

auth=tweepy.OAuthHandler(consumer_key,consumer_secret)
auth.set_access_token(access_token,access_token_secret)
api=tweepy.API(auth)
search_words = "pollution"
date_since = "2018-11-16"
tweets = api.search( q=search_words, lang='en', since=date_since ,count=1,tweet_mode='extended')
for tweet in tweets:
    k=k+1
    if 'retweeted_status' in tweet._json:
        s=tweet._json['retweeted_status']['full_text']
        l = ob.tokenize(s)

    else:
        s=tweet.full_text
        l = ob.tokenize(s)
    dic[k] = l
    # print(l)
    for i in l:
        p.add(i)
    for i in p:
        if i not in words.words():
            invalid[i]=0
print(p)
print(dic)
print(invalid)

设置了输出([u'is',u'coercive',u'1st',u'need',u。 我希望输出为set(['is','coercive','1st','need'..

0 个答案:

没有答案