num_terms = 10
fibonacci = [0, 1]

while len(fibonacci) < num_terms:
  next_term = fibonacci[-1] + fibonacci[-2]
Click Run or press shift + ENTER to see the the output.

Python Fiddle: Online Python Compiler, IDE, and Interpreter

Python Fiddle is an online Python compiler. We believe that programming should be accessible to everyone and everywhere, and that's why we've created a platform where users can write, run, and share Python code directly from their web browser. Our mission is to empower developers, educators, and programming enthusiasts from all around the world to experiment, practice, and collaborate effortlessly.

Features of Python Fiddle

Online Python IDE

Start coding in Python right away without the need to set up a local development environment. Simply open your web browser, visit our website, and you're ready to go. Our code editor is powered by Ace, a high performance code editor for the web.

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.

Python Packages

Popular Python packages like pandas, numpy, scipy, matplotlib, bokeh, plotly, and seaborn are supported out of the box. Check out the full list of packages here.

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!

Social sharing preview

AI Assistant

Get help with code errors from our Python AI assistant to get a detailed explanation of the error and how to fix it.

Social sharing preview

Install Locally as a PWA

You can install Python Fiddle as a Progressive Web App (PWA) on your mobile device or desktop computer. PWAs are web applications that can be installed on your device and accessed from your home screen. They are fast, reliable, and provide a native app-like experience. By installing Python Fiddle as a PWA, you will get faster load times, increased performance, and a full-screen experience. Follow instructions on this page to install Python Fiddle as a PWA on your device.

File Downloads

Need to save your code or run it locally? You can easily download your code as a Python file by clicking the Download button in the toolbar. You can also download any files generated by your code, such as images or CSVs. See our files example to try out this feature.


Python is a powerful and versatile programming language known for its simplicity and readability. Developed in the late 1980s, Python has gained immense popularity due to its ease of use and its extensive range of applications. From web development to data analysis, machine learning to artificial intelligence, Python is used across various domains.


This platform provides online Python code runner powered by Pyodide, a port of CPython to WebAssembly/Emscripten. Pyodide enables the installation and execution of Python packages in the browser using micropip, supporting a wide range of packages including general-purpose and scientific ones.