Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to split a string in python with multiple delimiters

>>> a='Beautiful, is; better*than
ugly'
>>> import re
>>> re.split('; |, |*|
',a)
['Beautiful', 'is', 'better', 'than', 'ugly']
Comment

PREVIOUS NEXT
Code Example
Python :: average out all rows pandas 
Python :: how to add scrollbar to listbox in tkinter 
Python :: how to get the amount of nan values in a data fram 
Python :: cv2.adaptiveThreshold() python 
Python :: how to graph with python 
Python :: installing more modules in pypy 
Python :: python for each attribute in object 
Python :: undo cell delete kaggle 
Python :: positive lookahead regex python 
Python :: print list vertically in python with loop 
Python :: np zeros in more dimensions 
Python :: add button to streamlit 
Python :: remover espaços string python 
Python :: flask marshmallow 
Python :: tribonacci sequence python 
Python :: pygame.transform.scale 
Python :: pandas count distinct 
Python :: python discord how to get user variables 
Python :: flask hello world 
Python :: saving a pandas dataframe as a csv 
Python :: python -m pip install 
Python :: drop second column pandas 
Python :: django delete session 
Python :: how to get the year in python 
Python :: text to sound python 
Python :: convert hex to decimal python 
Python :: import counter python 
Python :: python get the key with the max or min value in a dictionary 
Python :: Make A Snake Game Using Python and Pygame 
Python :: python bcrypt 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =