Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to divide string in python

text = 'geeks for geeks'
  
# Splits at space
print(text.split())
  
word = 'geeks, for, geeks'
  
# Splits at ','
print(word.split(','))
  
word = 'geeks:for:geeks'
  
# Splitting at ':'
print(word.split(':'))
  
word = 'CatBatSatFatOr'
  
# Splitting at t
print(word.split('t'))
Comment

PREVIOUS NEXT
Code Example
Python :: pandas if nan, then the row above 
Python :: convert to string in python 
Python :: python reading into a text file and diplaying items in a user friendly manner 
Python :: spacy french stopwords 
Python :: container with most water python code leetcode 
Python :: input a number and print even numbers up to that number in python 
Python :: how to pass primary key to url django 
Python :: python add new key to dictionary 
Python :: ide for python 
Python :: python casting float to int 
Python :: create a list of pandas index 
Python :: python regex find single character 
Python :: python remove first element of list 
Python :: export list to a file python 
Python :: program python factorial 
Python :: python pathlib os module 
Python :: python selenium: does not wait until page is loaded after a click() command 
Python :: set method in python 
Python :: how to iterate a list in reverse order in python with index 
Python :: python check if value in string 
Python :: remove deprecation warning python 
Python :: how to add string in csv in python 
Python :: qdate to date 
Python :: tkinter textboxe position 
Python :: @foreach 1 numper 
Python :: error python 
Python :: python cant remove temporary files 
Python :: #Function in python 
Python :: |= operator python 
Python :: python types of loops 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =