Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

split by several characters python

# Python3 code to demonstrate working of 
# Splitting operators in String 
# Using re.split() 
  
import re
  
# initializing string
data = "GeeksforGeeks, is_an-awesome ! website"
  
# printing original string  
print("The original string is : " + data) 
  
# Using re.split() 
# Splitting characters in String 
res = re.split(', |_|-|!', data)
  
# printing result  
print("The list after performing split functionality : " + str(res))
Comment

PREVIOUS NEXT
Code Example
Python :: add metadata png PIL 
Python :: right-left staircase python 
Python :: how to concatenate dataframe in python 
Python :: how to get key value in nested dictionary python 
Python :: python pillow convert jpg to png 
Python :: handwriting python 
Python :: pandas merge two dataframes remove duplicates 
Python :: python simple web app 
Python :: sklearn predict threshold 
Python :: python timer 
Python :: pandas -inf and inf to 0 
Python :: move file python os 
Python :: pandas get outliers 
Python :: pandas filter rows that are in a list 
Python :: python longest list in list 
Python :: setattr python 
Python :: print random integers 
Python :: how to set and run flask app on terminal 
Python :: from django.http import HttpResponse 
Python :: python uppercase 
Python :: python run curl 
Python :: python dictionary get keys and values 
Python :: rock paper scissors python 
Python :: how to run shell command in python 
Python :: flask print request headers 
Python :: Print First 10 natural numbers using while loop 
Python :: superscript python 
Python :: python print error output 
Python :: overload operator python 
Python :: jupyter notebook not working 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =