Python
num_terms = 10
fibonacci = [0, 1]

while len(fibonacci) < num_terms:
  next_term = fibonacci[-1] + fibonacci[-2]
  fibonacci.append(next_term)
  
print(fibonacci)
CTRL + ENTER to send

Python-Fiddle: Online Python Compiler, IDE, and Interpreter

This platform was created make Python programming accessible to everyone and everywhere. You can write, run, and share Python code directly from the web browser without any need to install and maintain Python and packages on your computer. We hope to make this a useful tool for learning, teaching, sharing, and collaborating on Python projects. If you have any feedback or suggestions, please feel free to reach out to us.

Features of Python-Fiddle

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

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.

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.

Run code from stackoverflow.com

Connect to a Local Folder

You can connect to a folder on your computer to access your own files from your code. This feature is useful for reading and writing files, importing modules, and working with data stored on your computer. To use your files, click on the folder icon in the toolbar and select the folder you want to mount.

Interactive Embeds on Medium

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.

Social sharing preview

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!

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.

How to install as a PWA

Python

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.

Pyodide

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.