Wrap-Up and Review
This lesson wraps up the course on Splitting, Concatenating, and Joining Strings in Python. You will see a summary and review of everything you have learned so far. If you’re interested in learning more, check out the tutorials linked below:
- Python 3’s f-Strings: An Improved String Formatting Syntax
- Python String Formatting Best Practices
- Strings and Character Data in Python
Take the Quiz: Test your knowledge with our interactive “Splitting, Concatenating, and Joining Strings in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:
Interactive Quiz
Splitting, Concatenating, and Joining Strings in PythonIn this quiz, you can test your Python skills when it comes to the most fundamental string operations: splitting, concatenating, and joining.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
00:00 In this series of videos, we have covered splitting, concatenating, and joining strings. Let’s do a quick recap of strings and these three operations. Strings are immutable sequences, meaning no method or operation can change the string once it is established in your code. When we split strings, we take a string and divide it into portions using a separator.
00:23
The .split()
method then returns those string portions as elements in a new list. We specify the separator by passing it as a string argument.
00:33
If we don’t specify a separator, .split()
will use whitespace by default. Specifying a maxsplit
argument will limit the number of splits. While splitting involves breaking a string apart, concatenating and joining are about putting strings together.
00:50
We can create a new string by adding or using the plus sign (+
) to combine two or more strings. This is known as concatenation. Joining involves invoking .join()
upon a separator string and passing a string sequence argument to the method.
01:10 The effect will be a new string with the sequence elements separated by the invoking separator string.
01:17 It is not uncommon to see the invoking string be empty.
01:24 We have barely touched upon the many great features of Python strings. If you’re interested in learning more, check out our tutorials on f-strings, formatting, and strings and character data.
gthomas75 on March 26, 2019
good session
Tonya Sims on July 3, 2019
Thank you for this wonderful tutorial!!
brunofl on Aug. 7, 2019
nice and clear
paolotagliente on July 23, 2020
nice and clear thanks
sunflower761 on Aug. 22, 2020
Great tutorial, thank you!
dngrant on March 20, 2021
Outstanding! Well done. Succinct, but complete!!
Become a Member to join the conversation.
JulianV on March 18, 2019
Thanks Jakie.