Python Loop Over String Javascript Substring Function In Excel