Python PSF Docs PyPI Jobs Community
Donate ≡ Menu Search AA Socialize
# Python 3: Fibonacci series up to n Functions Defined # Py
>_
>>> def fib(n): The core of extensible programming is defining functions. >>>
>>> a, b = 0, 1 >>>
Python allows mandatory and optional arguments, keyword
>>> while a < n: frui
arguments, and even arbitrary argument lists. More about
>>> print(a, end=' ') >>>
defining functions in Python 3
>>> a, b = b, a+b ['BA
>>> print()
>>> fib(1000) # Li
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 >>>
987 [(0,
1 2 3 4 5
Python is a programming language that lets you work quickly
and integrate systems more effectively. >>> Learn More
Join us in Pittsburgh, PA starting May 14, 2025. Grab your ticket today before we sell out! REGISTER FOR PYCON US!
Get Started Download Docs Jobs
Whether you're new to Python source code and Documentation for Python's Looking for work or have a
programming or an experienced installers are available for standard library, along with Python related position that
developer, it's easy to learn and download for all versions! tutorials and guides, are you're trying to hire for? Our
use Python. available online. relaunched community-run
Latest: Python 3.13.2
job board is the place to go.
Start with our Beginner’s Guide docs.python.org
jobs.python.org
Latest News >>> More Upcoming Events >>> More
2025-03-14 Python 3.14.0 alpha 6 is out 2025-04-05 Python Communities - Yaounde
PSF Distinguished Service Award Granted to Thomas 2025-04-06 Python Conference Austria 2025
2025-03-12
Wouters
2025-04-09 Python Meeting Düsseldorf
2025-03-11 PSF Distinguished Service Award Granted to Van Lindberg
2025-04-11 PyTexas 2025
PSF Distinguished Service Award Granted to Ewa
2025-03-06 2025-04-15 Workshop: Creating Python Communities
Jodlowska
Announcing Python Software Foundation Fellow
2025-03-04
Members for Q4 2024!
Success Stories >>> More Use Python for… >>> More
Web Development: Django , Pyramid , Bottle , Tornado , Flask , web2py
Thanks to the flexibility of Python and the powerful
GUI Development: tkInter , PyGObject , PyQt , PySide , Kivy , wxPython ,
ecosystem of packages, the Azure CLI supports
DearPyGui
features such as autocompletion (in shells that
Scientific and Numeric: SciPy , Pandas , IPython
support it), persistent credentials, JMESPath result
parsing, lazy initialization, network-less unit tests, Software Development: Buildbot , Trac , Roundup
and more. System Administration: Ansible , Salt , OpenStack , xonsh
Building an open-source and cross-platform Azure CLI with Python by Dan
Taylor
>>> Python Software Foundation
The mission of the Python Software Foundation is to promote, protect, and advance the Python
programming language, and to support and facilitate the growth of a diverse and international
community of Python programmers. >>> Learn more
Become a Member Donate to the PSF
About Downloads Documentation Community Success Stories News
Applications All releases Docs Diversity Arts Python News
Quotes Source code Audio/Visual Talks Mailing Lists Business PSF Newsletter
Getting Started Windows Beginner's Guide IRC Education PSF News
Help macOS Developer's Guide Forums Engineering PyCon US News
Python Brochure Other Platforms FAQ PSF Annual Impact Report Government News from the
Community
License Non-English Docs Python Conferences Scientific
Events Alternative PEP Index Special Interest Groups Software Development
Implementations Contributing
Python Events Python Books Python Logo
Developer's Guide
User Group Events Python Essays Python Wiki
Issue Tracker
Python Events Archive Code of Conduct
python-dev list
User Group Events Archive Community Awards
Core Mentorship
Submit an Event Get Involved
Report a Security Issue
Shared Stories
Help & General Contact Diversity Initiatives Submit Website Bug Status
Copyright ©2001-2025. Python Software Foundation Legal Statements Privacy Notice