Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if string has square brackets python

string = "This is a [sentence]"


first = string.find("[")


second = string.find("]")


print(string[first + 1:second])
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #check #string #square #brackets #python
ADD COMMENT
Topic
Name
2+5 =