Jquery Variable Inside String Javascript Substring Function In Python