Learn

Now let’s try working with strings!

for item in list: print item for i in range(len(list)): print list[i]

The example above is just a reminder of the two methods for iterating over a list.

Instructions

1.

Create a function that concatenates strings.

  • Define a function called join_strings accepts an argument called words. It will be a list.
  • Inside the function, create a variable called result and set it to "", an empty string.
  • Iterate through the words list and concatenate each word to result.
  • Finally, return the result.

Don’t add spaces between the joined strings!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?