Python Remove Text After Substring Method Sql Interview