BaşlayınÜcretsiz başlayın

Accessing retweet data

Now we're going to work with a tweet JSON that contains a retweet. A retweet has the same structure as a regular tweet, except that it has another tweet stored in retweeted_status.

The new tweet has been loaded as rt.

Bu egzersiz, kursun bir parçasıdır

Analyzing Social Media Data in Python

Kursa Göz Atın

Egzersiz talimatları

  • Print the text of the tweet.
  • Print the text of the tweet which has been retweeted, which is contained in retweeted_status.
  • Print the user handle of the tweet.
  • Print the user handle of the tweet which has been retweeted, which is contained in retweeted_status.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Print the text of the tweet
print(rt[____])

# Print the text of tweet which has been retweeted
print(rt[____][____])

# Print the user handle of the tweet
print(rt[____][____])

# Print the user handle of the tweet which has been retweeted
print(rt[____][____][____])
Kodu Düzenle ve Çalıştır