Getting Started Type or paste Python code into the box on the left. Click Run to view its output in the box on the right. Click Save when you're done. Don't worry- you can always edit the code later.
First time? Try typing: print("Hello, World!")
Python Version By default, this Trinket will try to run both Python 2 and 3 code. You can also enable strict Python 2 or Python 3 modes with a #!/bin/python2
or #!/bin/python3
shebang at the top of your trinket. Learn more here.
Supported Modules Wondering what modules we support? We have a list of modules available to import, including examples.
Examples
If you're looking for ideas on how to get started, here are a few examples to help. Click on one of the images to try it out.
- Show code and output side-by-side (smaller screens will only show one at a time)
- Only show output (hide the code)
- Only show code or output (let users toggle between them)
Add to Group
Decide which group to add this trinket below.
You don't have any groups that you can add a trinket to — try creating a new one!
You can also create a new group.