STEP 9: Now that we have a list of strings, we can loop through it to see the first letter of each word!

  • From drag out Loop through List. This will loop once for every string stored in the list.
  • Change value to word and my_list to purpose_words_list.
  • From add Print Variable indented in the loop. Change my_var to word[0].

print(word[0]) uses string indexing to print the FIRST letter of each word.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)