This course is about working with text the JavaScript way. Most of Python’s string toolkit is there, often under another name. Where the two differ, the code often runs without an error and prints the wrong text. Along the way, you’ll port a payments team’s Python helper that turns a ticket header into a branch name and a commit subject.
Here’s a first taste. The helper’s first line splits the ticket header with split(":", 1). Here it
is in Python, on the header of ticket PAY-2291:
header = (
"PAY-2291: Refund emails show the wrong currency: "
"EUR shown as USD"
)
print(header.split(":", 1))
Python gives the key and the whole title:
['PAY-2291', ' Refund emails show the wrong currency: EUR shown as USD']