By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
rocoderesrocoderes
  • Home
  • HTML & CSS
    • Login and Registration Form
    • Card Design
    • Loader
  • JavaScript
  • Python
  • Internet
  • Landing Pages
  • Tools
    • Google Drive Direct Download Link Generator
    • Word Count
  • Games
    • House Painter
Notification Show More
Latest News
How to set the dropdown value by clicking on a table row
Javascript – How to set the dropdown value by clicking on a table row
JavaScript
Attempting to increase the counter, when the object's tag exist
Javascript – Attempting to increase the counter, when the object’s tag exist
JavaScript
Cycle2 JS center active slide
Javascript – Cycle2 JS center active slide
JavaScript
Can import all THREE.js post processing modules as ES6 modules except OutputPass
Javascript – Can import all THREE.js post processing modules as ES6 modules except OutputPass
JavaScript
How to return closest match for an array in Google Sheets Appscript
Javascript – How to return closest match for an array in Google Sheets Appscript
JavaScript
Aa
Aa
rocoderesrocoderes
Search
  • Home
  • HTML & CSS
    • Login and Registration Form
    • Card Design
    • Loader
  • JavaScript
  • Python
  • Internet
  • Landing Pages
  • Tools
    • Google Drive Direct Download Link Generator
    • Word Count
  • Games
    • House Painter
Follow US
High Quality Design Resources for Free.
rocoderes > Python > Python String split() Method
Python

Python String split() Method

Rohan750
Last updated: 2021/05/14 at 7:13 AM
Rohan750
Share
1 Min Read
Split method in python

 πŸ‘‰ The split() method splits a string into a list. Separate the string in the list where each word is a list item.

Example:


str = "this is a String"
words = str.split()
print(words)

output:


['this', 'is', 'a', 'String']

πŸ‘‰str.split() to create a list of all words in str separated by a space.

if you get the first word in a string.

Example:


str "this is a String"
words = str.split()[0]
print(words)

output:


this

str.split() with [0] to return the first word in str.

Related

Subscribe to Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

Share this Article
Facebook Twitter Email Print
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Strings in javascript
Next Article custom pagination in javascript thumb Custom Pagination in JavaScript(beginners)
7 Comments 7 Comments
  • Elizabeth says:
    November 17, 2021 at 12:05 am

    You can certainly see your enthusiasm within the article
    you write. The world hopes for even more passionate writers like you who are not afraid
    to mention how they believe. Always go after your heart.

    Reply
  • Ezequiel says:
    November 18, 2021 at 9:51 pm

    Link exchange is nothing else but it is only placing the other person’s webpage
    link on your page at suitable place and other person will also
    do similar in favor of you.

    Reply
  • Dianne says:
    November 22, 2021 at 5:34 pm

    I’d like to thank you for the efforts you have put in penning
    this website. I am hoping to see the same high-grade
    blog posts from you in the future as well. In truth, your creative writing abilities has motivated me
    to get my very own website now πŸ˜‰

    Reply
  • Tyrell says:
    November 23, 2021 at 5:58 am

    Wonderful site you have here but I was wondering if you knew
    of any forums that cover the same topics discussed here?
    I’d really love to be a part of community where I can get opinions
    from other knowledgeable individuals that share the same
    interest. If you have any suggestions, please let me know.
    Thanks!

    Reply
  • Joesph says:
    November 23, 2021 at 6:34 pm

    you are in point of fact a excellent webmaster. The web site loading velocity is amazing.
    It sort of feels that you are doing any unique trick.

    Also, The contents are masterwork. you have done a fantastic activity on this matter!

    Reply
  • Margaret Bregel says:
    May 2, 2022 at 4:05 am

    Thank you, I have recently been looking for information approximately this subject for a while and yours is the best I’ve discovered till now. But, what in regards to the conclusion? Are you positive concerning the supply?

    Reply
  • Rory Smolenski says:
    May 22, 2022 at 1:13 pm

    Excellent post. I was checking constantly this blog and I’m impressed! Extremely helpful info specifically the last part πŸ™‚ I care for such info a lot. I was seeking this particular information for a very long time. Thank you and best of luck.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

- Advertisement -

You Might Also Like

Rock Paper Scissors Python

How To Make Rock Paper Scissors Python Game 2022

November 26, 2022
python QR code generator

How To Make Python QR Code Generator

November 25, 2022
Countdown Calendar using Python Tkinter

How to Make Countdown Calendar using Python Tkinter

November 24, 2022
binary search algorithm in python

What is Binary Search Algorithm in python?

November 23, 2022
rocoderesrocoderes
Follow US

Copyright Β© 2022 All Right Reserved By Rocoderes

  • Home
  • About us
  • Contact us
  • Disclaimer
Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc.

Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Lost your password?