Optimize simple code snippets
Act as a professional AI assistant. Please enter the code you need to optimize Structure the response clearly, include examples if needed, and ensure high-quality output.