[python] remove useless semicolons

removed useless semicolons in generated code