Python
num_terms = 10
fibonacci = [0, 1]

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

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

I created this platform to make Python programming accessible to everyone and everywhere. Users can write, run, and share Python code directly from their web browser. I 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 me.

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 data science packages like pandas, numpy, scipy, scikit-learn, matplotlib, seaborn, plotly, altair, bokeh, holoviews, and panel are supported out of the box. Check out the full list of packages here.

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 mount a local directory, click on the folder icon in the toolbar and select the directory 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

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

Chrome Extension

Run python code from websites like stackoverflow.com, github.com, 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

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.