Movatterモバイル変換


[0]ホーム

URL:


How to Split a String in Python

Python String Splitting

Vishal Shrestha
Vishal Shrestha11 Lessons 39m Sep 09, 2025basicspython
Start Now
Rate and Review

Python’s.split() method lets you divide a string into a list of substrings based on a specified delimiter. By default,.split() separates at whitespace, including spaces, tabs, and newlines. You can customize.split() to work with specific delimiters using thesep parameter, and control the amount of splits withmaxsplit.

By the end of this video course, you’ll understand that:

  • Yousplit a string by spaces in Python using.split() without arguments.
  • Python’s.split() method can split oncustom delimiters when you pass a character or string as an argument.
  • Youlimit splits usingmaxsplit to control the number of substrings Python extracts.
  • re.split() usesregular expressions for splitting strings based on complex patterns.

What’s Included:

  • 11 Lessons
  • Video Subtitles and Full Transcripts
  • 1 Downloadable Resource
  • Accompanying Text-Based Tutorial
  • Interactive Quiz to Check Your Progress
  • Q&A With Python Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

Start Now

Python String Splitting

9 Lessons 32m

  1. 1. Python String Splitting (Overview)04:06
  2. 2. Setting the Stage and String Basics01:38
  3. 3. Using the .split() Method: Fundamentals01:43
  4. 4. Calling .split(): Default Behavior02:13
  5. 5. Exploring Common Use Cases06:12
  6. 6. Splitting With a Delimiter04:58
  7. 7. Learning About the maxsplit Argument05:06
  8. 8. Introducing .rsplit()02:29
  9. 9. Diving Into Advanced Splitting Techniques03:51

Reviewing What You've Learned

2 Lessons 7m

  1. 1. Python String Splitting (Quiz)04:30
  2. 2. Python String Splitting (Summary)03:06
Start Now

AboutVishal Shrestha

Vishal is a seasoned software developer with 10+ years of experience, specializing in Python and Django. You can find him coding or trekking in the mountains of Nepal – sometimes simultaneously (we're not sure how!).

» More about Vishal

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Related Courses:

← Browse All Courses


[8]ページ先頭

©2009-2026 Movatter.jp