Share Python Code
· a runnable Python pastebinexit() to end
Error ·
Waiting for input
Interactive
Debug
Run to see output here.
Try things first, save when you're ready.
Run, edit, run again; nothing's in the database yet.
Click Save & get link when you want a permalink to share.
- A docstring titles your paste. Start a file with a one-line docstring and that's the name shown in page titles, your pastes list, and link previews.
- print() what you want shown. Scripts only show what they print; unlike a REPL, bare expressions aren't echoed.
- Ctrl+Enter runs; Ctrl+S saves. Both work while typing in the editor (use ⌘ on a Mac).
-
curl gets just the code.
Using
curl -Lto access a paste's URL returns the raw Python file, not a web page. - Link previews show your code. Share a paste link on Slack or social media and the preview is your code.
Running Python in the browser needs SharedArrayBuffer support, which this browser doesn't provide on this page. Copying and sharing the code still works.
Auto-backed up on this device; it only reaches our database when you tap Save. This browser is blocking draft backups; tap Save to keep your work.
About, Privacy, Terms
This is a free tool for sharing and running Python code, designed for Python learners and teachers.
Privacy
Code snippet links are not indexed by search engines, but don't expect privacy from them (guessing URLs is possible).
Duration
Code snippets expire after 7 days by default. You can signup for a Python Morsels account to make unexpiring code snippets.
Code snippets may be removed before their expiration date. We are not responsible for data loss or removed pastes.
Acceptable Use Policy
This page was created for sharing Python code snippets. Submitting many pastes per day is fine, but uploading an excessive amount of data or using excessive bandwidth is frowned upon. And remember that this is not a file hosting service.
Please do not post information that should be private or secure. Please do not use this service to cause harm.
