How to Split Strings in Python With the split() Method

Published: 27 June 2019
on channel: Real Python
195,422
3.3k

Download your free Python Cheat Sheet here: https://realpython.com/cheatsheet
Free Python Skill Test with instant level + learning plan: https://realpython.com/skill-test
Want to learn faster? Become a Python Expert with unlimited access to 5,000+ tutorials, videos, and exercises: https://realpython.com/start

You'll learn how to split strings in Python using the .split() method.

.split() has optional parameters that allow you to fine tune how strings are split. You’ll see how to use a bare call to .split() to cut out whitespace from a string and get a list of words.

You’ll also learn how to specify separators and also limit the number of splits in calls to split() using the "maxsplit" parameter.

Click here to learn more: https://realpython.com/courses/splitt...

🐍 Become a Python expert with real-world tutorials, on-demand courses, interactive quizzes, and 24/7 access to a community of experts at https://realpython.com

▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰
🐍 Start Here → https://realpython.com/start
🗺️ Guided Learning Paths → https://realpython.com/learning-paths
🎧 Real Python Podcast → https://realpython.com/podcast

📚 Python Books → https://realpython.com/books
📖 Python Reference → https://realpython.com/ref
🧑‍💻 Quizzes & Exercises → https://realpython.com/quizzes

🎓 Live Courses: https://realpython.com/live
⭐️ Reviews & Learner Stories: https://realpython.com/learner-stories
▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰


On this page of the site you can watch the video online How to Split Strings in Python With the split() Method with a duration of hours minute second in good quality, which was uploaded by the user Real Python 27 June 2019, share the link with friends and acquaintances, this video has already been watched 195,422 times on youtube and it was liked by 3.3 thousand viewers. Enjoy your viewing!