You mean like a BMW i3 with a range extender? Little two-cylinder petrol that just spins a genny.
They work, they're not terribly efficient in terms of converting fuel to distance travelled, and really batteries are getting so good these days there's little point any more.