DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python remove brackets from string
>>> import re >>> my_str = 'Hello [World]' >>> re.sub(r'[[]]', r'', my_str) 'Hello World'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#remove
#brackets
#string
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit