Python
num_terms = 10
fibonacci = [0, 1]

while len(fibonacci) < num_terms:
  next_term = fibonacci[-1] + fibonacci[-2]
  fibonacci.append(next_term)
  
print(fibonacci)
Python Fiddle

Write, run, and share Python directly in your browser

No installation needed. Import any package, run code instantly, and share your work with a single link.

12K+
Developers using it
250+
Packages available
0
Setup required
Free
To get started
Features

Everything you need to code in Python

Online Python IDE

Powered by Ace editor — syntax highlighting, autocomplete, and linting built in.

Auto-install Packages

Just import — NumPy, Pandas, Matplotlib, and 250+ packages install automatically.

AI Assistant

Ask the AI to explain, debug, or rewrite your code. Powered by the latest models.

Save & Share

Share your fiddles with a unique link. Premium users can keep them private.

Mount Local Folder

Access files directly from your computer — read and write local files from your code.

Tutorials & Challenges

Learn Python with interactive tutorials and level up with coding challenges.

Pricing

Unlock the full power of Python Fiddle

Platinum

$99/year

  • Everything in Premium plan
  • Unlimited Code Execution
  • Up to 100 AI prompts per day, 1000 per month
  • 250MB Persistent file storage
  • Longer AI chats
Most popular

Premium

$49/year

  • Private Fiddles
  • Up to 20 AI prompts per day, 300 per month
  • 100MB Persistent file storage
  • Premium AI models
  • Edit existing Fiddles
  • Access solutions to coding challenges
  • Ad-free experience

Free

$0/year

  • Public Fiddles
  • Temporary file uploads
  • Interactive tutorials
  • Python coding challenges
Support

Frequently asked questions

Can't find the answer you're looking for?

Contact support

Python Packages

Popular data science packages like pandas, scipy, scikit-learn, matplotlib, seaborn, plotly, altair, bokeh, panel, statsmodels, dask, xgboost, duckdb, and more are supported out of the box. Check out the full list of packages here.

Online Python IDE

Python Fiddle provides a web-based IDE where you can start writing Python code quickly without having to set up a local development environment. Our code editor is powered by Ace, a high performance code editor for the web. You can write and run your Python code in any web browser of your choice.

Online Python Compiler

Python Fiddle offers an online Python compiler so you can run your Python code directly from the online editor. Code is executed with Pyodide, a port of CPython to WebAssembly/Emscripten. Some functionality in Python may not be available or may not work as expected.

Chrome Extension

Run python code from websites like stackoverflow.com, ChatGPT, github.com, geeksforgeeks.org, and pastebin.com with the Python Fiddle Chrome extension. The extension adds a "Run on python-fiddle.com" button to python code blocks on these websites. Simply click on the button and the code will be copied to python-fiddle.com and executed.

Files

You can upload files or open a folder from your computer to access your own files in your code. This feature is useful for working with data stored on your computer.

Interactive Embeds

Embed interactive Python notebooks on Medium or any other website that supports embed.ly. Click on the Share button, copy the link to your saved fiddles and simply paste on Medium to create an interactive embed. Visitors to your blog/website can run the code, modify it, and see the output instantly. It's a great way to engage your audience and make your content more interactive.

Python Fiddle Badge

Add support for executing your Jupyter notebooks on python-fiddle.com by including a Python Fiddle badge in your Jupyter notebook or anywhere with support for markdown or HTML.

Online Sharing

Share your code with others by clicking on the Share button and copying the link. Anyone with the link can view and run your code. It's an excellent way to showcase your skills, seek help from the Python community, or teach Python to your friends!