How does python delete the content after the specified character

str = '青花瓷(live版)'
head, sep, tail = str.partition('(')
print(head)

The character is divided into three parts, output the head, it will output:

青花瓷 

 

Guess you like

Origin blog.csdn.net/sinat_39416814/article/details/106000814