Is there an easy way to capitalize the first letter of each word after "-" in a string and leave the rest of string intact?
x="hi there-hello world from Python - stackoverflow"
expected output is
x="Hi there-Hello world from Python - Stackoverflow"
what I tried is :
"-".join([i.title() for i in x.split("-")]) #this capitalize the first letter in each word; what I want is only the first word after split
Note: "-" isn't always surrounded by spaces