How to cut a string into three parts with a delimiter in Python

1 Answer

0 votes
string = "Python is a high-level interpreted general-purpose programming language"

print(string.partition("interpreted"))



'''
run:

('Python is a high-level ', 'interpreted', ' general-purpose programming language')

'''

 



answered Aug 10, 2022 by avibootz

Related questions

...