René's URL Explorer Experiment


Title: How to Split a String in Python – Real Python

Open Graph Title: How to Split a String in Python – Real Python

Description: This tutorial will help you master Python string splitting. You'll learn to use .split(), .splitlines(), and re.split() to effectively handle whitespace, custom delimiters, and multiline text, which will level up your data parsing skills.

Open Graph Description: This tutorial will help you master Python string splitting. You'll learn to use .split(), .splitlines(), and re.split() to effectively handle whitespace, custom delimiters, and multiline text, which will level up your data parsing skills.

Mail addresses
?subject=Python article for you&body=How to Split a String in Python on Real Python https://realpython.com/python-split-string/

Opengraph URL: https://realpython.com/python-split-string/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "How to Split a String in Python",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/How-to-Split-a-String-in-Python_Watermarked.757635260d9e.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-split-string/",
    "lastReviewed": "2024-11-04",
    "author": {
      "@type": "Person",
      "name": "Martin Breuss",
      "image": "https://realpython.com/cdn-cgi/image/width=456,height=456,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/martin_breuss_python_square.efb2b07faf9f.jpg",
      "url": "https://realpython.com/team/mbreuss/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Adriana Cutenco",
        "image": "https://realpython.com/cdn-cgi/image/width=900,height=900,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/acutenco.676e4197c133.jpg",
        "url": "https://realpython.com/team/acutenco/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brad Solomon",
        "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
        "url": "https://realpython.com/team/bsolomon/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brenda Weleschuk",
        "image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
        "url": "https://realpython.com/team/bweleschuk/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bartosz Zaczy\u0144ski",
        "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
        "url": "https://realpython.com/team/bzaczynski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Dan Bader",
        "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/daniel-square.d58bf4388750.jpg",
        "url": "https://realpython.com/team/dbader/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Geir Arne Hjelle",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
        "url": "https://realpython.com/team/gahjelle/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Kyle Stratis",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/KEK9iuEG_400x400.28b60a4581c0.jpg",
        "url": "https://realpython.com/team/kstratis/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2025-02-05T14:00:00+00:00",
  "dateModified": "2024-11-04T11:19:06.712213+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Martin Breuss",
    "image": "https://realpython.com/cdn-cgi/image/width=456,height=456,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/martin_breuss_python_square.efb2b07faf9f.jpg",
    "url": "https://realpython.com/team/mbreuss/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "This tutorial will help you master Python string splitting. You'll learn to use .split(), .splitlines(), and re.split() to effectively handle whitespace, custom delimiters, and multiline text, which will level up your data parsing skills.",
  "hasPart": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "How do you split a string by spaces in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "

You use the .split() method without any arguments to split a string by spaces in Python. The default functionality handles spaces, and also tabs and newlines.

" } }, { "@type": "Question", "name": "Can Python\u2019s .split() method use custom delimiters?", "acceptedAnswer": { "@type": "Answer", "text": "

Yes, you can specify a custom delimiter as an argument to .split(), allowing you to split strings using characters like commas, semicolons, or tabs.

" } }, { "@type": "Question", "name": "Can .split() take two arguments?", "acceptedAnswer": { "@type": "Answer", "text": "

Yes, .split() can take two arguments: the delimiter and maxsplit, which limits the number of splits that Python performs on the string.

" } }, { "@type": "Question", "name": "How do you limit splits using maxsplit in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

You can use the maxsplit parameter with .split() to specify the maximum number of splits, allowing you to control how many substrings you want to extract.

" } }, { "@type": "Question", "name": "What does .splitlines() do in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

The .splitlines() method splits a string into a list of lines, handling different line boundary characters. You can optionally keep the line endings in the resulting list by setting the keepends parameter to True.

" } }, { "@type": "Question", "name": "What does .split(\"\\t\") do in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

When you call .split(\"\\t\") on a string, it splits the string at each tab character. This may be useful for handling data formatted with tabs, such as TSV files.

" } }, { "@type": "Question", "name": "How do you split a string into words while keeping whitespace?", "acceptedAnswer": { "@type": "Answer", "text": "

You can’t directly keep whitespace using .split(), because the method removes the delimiters. However, you can use re.split() with a regular expression to retain specific patterns, including whitespace.

" } }, { "@type": "Question", "name": "What does .strip().split() do in Python?", "acceptedAnswer": { "@type": "Answer", "text": "

You use .strip() to remove leading and trailing whitespace from a string, and then .split() to divide the cleaned string into a list of substrings. If you’re splitting on whitespace, then you don’t need to use .strip(), because .split() already handles whitespace for you.

" } } ] } }

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/How-to-Split-a-String-in-Python_Watermarked.757635260d9e.jpg
og:imagehttps://files.realpython.com/media/How-to-Split-a-String-in-Python_Watermarked.757635260d9e.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-split-string/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-split-string/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-split-string%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-split-string/#toc
How to Split a String in Python Using .split()https://realpython.com/python-split-string/#how-to-split-a-string-in-python-using-split
Split With Different Delimiters Using sephttps://realpython.com/python-split-string/#split-with-different-delimiters-using-sep
Limit the Amount of Splits With maxsplithttps://realpython.com/python-split-string/#limit-the-amount-of-splits-with-maxsplit
Go Backwards Through Your String Using .rsplit()https://realpython.com/python-split-string/#go-backwards-through-your-string-using-rsplit
Split Strings by Lines With .splitlines()https://realpython.com/python-split-string/#split-strings-by-lines-with-splitlines
Use re.split() for Advanced String Splittinghttps://realpython.com/python-split-string/#use-resplit-for-advanced-string-splitting
Conclusionhttps://realpython.com/python-split-string/#conclusion
Frequently Asked Questionshttps://realpython.com/python-split-string/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python-split-string/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-split-string/disliked/?from=article-sidebar
Python String Splittinghttps://realpython.com/courses/python-string-splitting/
Martin Breusshttps://realpython.com/python-split-string/#author
https://realpython.com/python-split-string/#reader-comments
basicshttps://realpython.com/tutorials/basics/
pythonhttps://realpython.com/tutorials/python/
How to Split a String in Python Using .split()https://realpython.com/python-split-string/#how-to-split-a-string-in-python-using-split
Split With Different Delimiters Using sephttps://realpython.com/python-split-string/#split-with-different-delimiters-using-sep
Limit the Amount of Splits With maxsplithttps://realpython.com/python-split-string/#limit-the-amount-of-splits-with-maxsplit
Go Backwards Through Your String Using .rsplit()https://realpython.com/python-split-string/#go-backwards-through-your-string-using-rsplit
Split Strings by Lines With .splitlines()https://realpython.com/python-split-string/#split-strings-by-lines-with-splitlines
Use re.split() for Advanced String Splittinghttps://realpython.com/python-split-string/#use-resplit-for-advanced-string-splitting
Conclusionhttps://realpython.com/python-split-string/#conclusion
Frequently Asked Questionshttps://realpython.com/python-split-string/#frequently-asked-questions
Remove adshttps://realpython.com/account/join/
Python String Splittinghttps://realpython.com/courses/python-string-splitting/
Click here to download the free sample codehttps://realpython.com/bonus/python-split-string/
https://realpython.com/quizzes/python-split-string/
How to Split a String in Pythonhttps://realpython.com/quizzes/python-split-string/
https://realpython.com/python-split-string/#how-to-split-a-string-in-python-using-split
working with multiline stringshttps://realpython.com/python-split-string/#split-strings-by-lines-with-splitlines
.strip()https://realpython.com/python-strip/
web scrapinghttps://realpython.com/web-scraping-with-scrapy-and-mongodb/
from PDFshttps://realpython.com/creating-modifying-pdf/
user inputhttps://realpython.com/python-keyboard-input/
tokenshttps://realpython.com/natural-language-processing-spacy-python/#tokens-in-spacy
chainhttps://en.wikipedia.org/wiki/Method_chaining
readability countshttps://realpython.com/zen-of-python/
unpack the iterablehttps://realpython.com/python-assignment-operator/#unpacking-iterables
f-stringhttps://realpython.com/python-f-strings/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-split-string/#split-with-different-delimiters-using-sep
Python’s csv libraryhttps://realpython.com/python-csv/
working with CSV fileshttps://realpython.com/python-interview-problem-parsing-csv-files/
positional argumenthttps://realpython.com/defining-your-own-python-function/#positional-arguments
keyword argumenthttps://realpython.com/defining-your-own-python-function/#keyword-arguments
Python’s csv libraryhttps://realpython.com/python-csv/
Python’s re modulehttps://realpython.com/regex-python-part-2/
advanced splittinghttps://realpython.com/python-split-string/#use-resplit-for-advanced-string-splitting
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-split-string/#limit-the-amount-of-splits-with-maxsplit
log filehttps://realpython.com/python-logging/
https://realpython.com/python-split-string/#go-backwards-through-your-string-using-rsplit
Python’s pathlib modulehttps://realpython.com/python-pathlib/
object-orientedhttps://realpython.com/python3-object-oriented-programming/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-split-string/#split-strings-by-lines-with-splitlines
.splitlines()https://docs.python.org/3/library/stdtypes.html#str.splitlines
iteratehttps://realpython.com/python-for-loop/
Python’s membership operatorhttps://realpython.com/python-in-operator/
iterate over the file objecthttps://realpython.com/read-write-files-python/#iterating-over-each-line-in-the-file
evaluates this operation lazilyhttps://realpython.com/python-lazy-evaluation/
iteratorhttps://realpython.com/ref/glossary/iterator/
yieldshttps://realpython.com/python-iterators-iterables/#yielding-the-original-data
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-split-string/#use-resplit-for-advanced-string-splitting
Python’s re modulehttps://realpython.com/regex-python/
input validationhttps://en.wikipedia.org/wiki/Data_validation
regular expressions in Pythonhttps://realpython.com/regex-python/
https://realpython.com/python-split-string/#conclusion
string methodshttps://realpython.com/python-strings/
text processinghttps://realpython.com/nltk-nlp-python/
Click here to download the free sample codehttps://realpython.com/bonus/python-split-string/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-split-string/#frequently-asked-questions
https://realpython.com/quizzes/python-split-string/
How to Split a String in Pythonhttps://realpython.com/quizzes/python-split-string/
https://realpython.com/feedback/survey/article/python-split-string/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-split-string/disliked/?from=article-footer
Python String Splittinghttps://realpython.com/courses/python-string-splitting/
https://realpython.com/team/mbreuss/
» More about Martinhttps://realpython.com/team/mbreuss/
https://realpython.com/team/acutenco/
Adrianahttps://realpython.com/team/acutenco/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bsolomon/
Bradhttps://realpython.com/team/bsolomon/
https://realpython.com/team/bweleschuk/
Brendahttps://realpython.com/team/bweleschuk/
https://realpython.com/team/bzaczynski/
Bartoszhttps://realpython.com/team/bzaczynski/
https://realpython.com/team/dbader/
Danhttps://realpython.com/team/dbader/
https://realpython.com/team/gahjelle/
Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/kstratis/
Kylehttps://realpython.com/team/kstratis/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-split-string
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-split-string
https://realpython.com/feedback/survey/article/python-split-string/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-split-string/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-split-string%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20How%20to%20Split%20a%20String%20in%20Python&url=https%3A%2F%2Frealpython.com%2Fpython-split-string%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20How%20to%20Split%20a%20String%20in%20Python%20https%3A%2F%2Frealpython.com%2Fpython-split-string%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-split-string%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
basicshttps://realpython.com/tutorials/basics/
pythonhttps://realpython.com/tutorials/python/
Python String Splittinghttps://realpython.com/courses/python-string-splitting/
How to Join Strings in Pythonhttps://realpython.com/python-join-string/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-split-string
Working With JSON Data in Pythonhttps://realpython.com/python-json/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-split-string
Regular Expressions: Regexes in Python (Part 1)https://realpython.com/regex-python/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-split-string
Functional Programming in Python: When and How to Use Ithttps://realpython.com/python-functional-programming/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-split-string
Build Command-Line Interfaces With Python's argparsehttps://realpython.com/command-line-interfaces-python-argparse/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-split-string
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-split-string%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-split-string%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-split-string/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.