This paper presents the results of a study comparing the energy efficiency of Python code generated by a large-scale language model (LLM) with that of human-written code and code written by green software experts. We tested 363 solutions to nine coding problems in the EvoEval benchmark using six widely used LLMs and four prompting techniques, and compared them with human-written solutions. Energy consumption was measured and analyzed on three hardware platforms: a server, a PC, and a Raspberry Pi. Human-written code was 16% more energy efficient on a server and 3% more energy efficient on a Raspberry Pi, while LLM was 25% more energy efficient than human-written code on a PC. Prompting techniques showed inconsistent energy savings across hardware platforms, while code written by green software experts was found to be at least 17% to 30% more energy efficient across all LLMs and hardware platforms.