Code Playground
Editor
1# Python Playground
2def greet(name):
3 return f"Hello, {name}!"
4
5def main():
6 print(greet("World"))
7
8 # List comprehension
9 numbers = [1, 2, 3, 4, 5]
10 squared = [x ** 2 for x in numbers]
11 print(f"Squared: {squared}")
12
13if __name__ == "__main__":
14 main()
15Click "Run Code" to execute your program.
💡 Tips
- • Use the Input tab for stdin
- • Java class must be named "Main"
- • Max execution time: 5 seconds
⌨️ Shortcuts
- • Click Reset to restore default code
- • Copy button saves to clipboard
- • Switch languages to see templates
🔒 Privacy
- • Code is not stored
- • Execution is sandboxed
- • Rate limited for fair use