Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 97843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:04:56+00:00 2026-05-11T00:04:56+00:00

There is one thing that I do not understand… Imagine you have a text

  • 0

There is one thing that I do not understand…

Imagine you have a text = ‘hello world’ and you want to split it.

In some places I see people that want to split the text doing:

string.split(text) 

In other places I see people just doing:

text.split() 

What’s the difference? Why you do in one way or in the other way? Can you give me a theory explanation about that?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:04:57+00:00Added an answer on May 11, 2026 at 12:04 am

    Interestingly, the docstrings for the two are not completely the same in Python 2.5.1:

    >>> import string >>> help(string.split) Help on function split in module string:  split(s, sep=None, maxsplit=-1)     split(s [,sep [,maxsplit]]) -> list of strings      Return a list of the words in the string s, using sep as the     delimiter string.  If maxsplit is given, splits at no more than     maxsplit places (resulting in at most maxsplit+1 words).  If sep     is not specified or is None, any whitespace string is a separator.      (split and splitfields are synonymous)  >>> help(''.split) Help on built-in function split:  split(...)     S.split([sep [,maxsplit]]) -> list of strings      Return a list of the words in the string S, using sep as the     delimiter string.  If maxsplit is given, at most maxsplit     splits are done. If sep is not specified or is None, any     whitespace string is a separator. 

    Digging deeper, you’ll see that the two forms are completely equivalent, as string.split(s) actually calls s.split() (search for the split-functions).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is one thing, that I do not understand. Why does this import scipy
I've read a few posts on this, but there's still one thing that's not
I'm trying to implement invitations with Game Center and there's one thing that i
There is one thing I never understood about references and I hope that one
There is one thing I really love about LXML, and that the E builder.
I am new to creating plug-ins, and there's much that I don't understand. One
There's one thing that I can't figure out. When I try to run rails
I understand the Async nature of Silverlight, but one thing that constantly hampers my
Just need to confirm one thing that i have searched enough on How can
This in one of the thing that still confuses me using Marionette. Imagine a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.