Bash Split First Occurrence Leetcode Python