Diesel locomotive
Diesel locomotives offer significant operating advantages over steam locomotives. They can safely be operated by one person, making them ideal for switching/shunting duties in yards (although for safety reasons many main-line diesel locomotives continue to have 2-man crews: an engineer and a conductor/switchman) and the operating environment is much more attractive, being quieter, fully weatherproof and without the dirt and heat that is an inevitable part of operating a steam locomotive. Diesel locomotives can be worked in multiple with a single crew controlling multiple locomotives in a single train — something not practical with steam locomotives. This brought greater efficiencies to the operator, as individual locomotives could be relatively low-powered for use as a single unit on light duties but marshaled together to provide the power needed on a heavy train. With steam traction a single very powerful and expensive locomotive was required for the heaviest trains or the operator resorted to double heading with multiple locomotives and crews, a method which was also expensive and brought with it its own operating difficulties.
Locomotive
In comparison to the principal alternative, the diesel engine, electric railways offer substantially better energy efficiency, lower emissions and lower operating costs. Electric locomotives are also usually quieter, more powerful, and more responsive and reliable than diesels. 
They have no local emissions, an important advantage in tunnels and urban areas. Some electric traction systems provide regenerative braking that turns the train's kinetic energy back into electricity and returns it to the supply system to be used by other trains or the general utility grid. While diesel locomotives burn petroleum, electricity can be generated from diverse sources including renewable energy.Steam-diesel hybrid locomotives can use steam generated from a boiler or diesel to power a piston engine. The "Cristiani Compressed Steam System" used a diesel engine to power a compressor to drive and recirculate steam produced by a boiler; effectively using steam as the power transmission medium, with the diesel engine being the prime mover