Skip to content

Instantly share code, notes, and snippets.

@alialavia
Created March 26, 2018 18:49
Show Gist options
  • Save alialavia/382c923c32cbd53f50d01627121a3025 to your computer and use it in GitHub Desktop.
Save alialavia/382c923c32cbd53f50d01627121a3025 to your computer and use it in GitHub Desktop.
tweet_string = "Thanks to the historic TAX CUTS that I signed into law, your paychecks are going way UP, your taxes are going way DOWN, and America is once again OPEN FOR BUSINESS!"
tweet_words = tweet_string.split()
number_of_words = len(tweet_words)
print(tweet_words)
print("Number of words in this tweet is: " + str(number_of_words))
# Iterate through the words in the tweet string
print("Words in the tweet are:")
for w in tweet_words:
len_of_w = len(w)
print("number of letters in " + w + " is " + str(len_of_w) )
print("End of the words in the tweet")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment