参考記事:リスト内包表記を使ったリストの作成
リスト内包表記の使い方
基本形
[式 for 変数 in イテラブルオブジェクト]
リストを効率的に書くための方法らしい。
実際に使ってみる
[tweet.user.name for tweet in tweepy.Cursor(api.search, q='スマブラ').items(10) if list(tweet.text)[:2] != ['R', 'T']]
いったん終わる
Go to list of users who liked
More than 3 years have passed since last update.
参考記事:リスト内包表記を使ったリストの作成
[式 for 変数 in イテラブルオブジェクト]
リストを効率的に書くための方法らしい。
[tweet.user.name for tweet in tweepy.Cursor(api.search, q='スマブラ').items(10) if list(tweet.text)[:2] != ['R', 'T']]
いったん終わる
Register as a new user and use Qiita more conveniently
Go to list of users who liked