Asdfe
Asdfe
Skip to content
Python
PSF
Docs
PyPI
Jobs
Community
Donate
窗体顶端
窗体底端
Socialize
About
Downloads
Documentation
Community
Success Stories
News
Events
>_ Launch Interactive Shell
# Python 3: Fibonacci series up to n
>>> def fib(n):
>>> a, b = 0, 1
>>> while a < n:
>>> print(a, end=' ')
>>> a, b = b, a+b
>>> print()
>>> fib(1000)0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610
987
Functions Defined
The core of extensible programming is defining functions. Python allows mandatory and
optional arguments, keyword arguments, and even arbitrary argument lists. More about
defining functions in Python 3
1. 1
2. 2
3. 3
4. 4
5. 5
Download
Python source code and installers are available for download for all versions!
Docs
Documentation for Python's standard library, along with tutorials and guides, are available
online.
docs.python.org
Jobs
Looking for work or have a Python related position that you're trying to hire for? Our relaunched
community-run job board is the place to go.
jobs.python.org
Latest News
More
Since its founding in 2007, Lincoln Loop has been building sites
for their clients with Python and Django. They credit Python's
philosophy of practicality and explicitness, along with the rich
ecosystem of open-source libraries available on PyPI, as keys to
their success. Additionally, the inclusivity, openness, and strong
culture of collaboration in the Python community have enabled
the agency to find and hire great people who are lifelong
learners.
o Applications
o Quotes
o Getting Started
o Help
o Python Brochure
Downloads
o All releases
o Source code
o Windows
o macOS
o Other Platforms
o License
o Alternative Implementations
Documentation
o Docs
o Audio/Visual Talks
o Beginner's Guide
o Developer's Guide
o FAQ
o Non-English Docs
o PEP Index
o Python Books
o Python Essays
Community
o Diversity
o Mailing Lists
o IRC
o Forums
o PSF Annual Impact Report
o Python Conferences
o Special Interest Groups
o Python Logo
o Python Wiki
o Code of Conduct
o Community Awards
o Get Involved
o Shared Stories
Success Stories
o Arts
o Business
o Education
o Engineering
o Government
o Scientific
o Software Development
News
o Python News
o PSF Newsletter
o PSF News
o PyCon US News
o News from the Community
Events
o Python Events
o User Group Events
o Python Events Archive
o User Group Events Archive
o Submit an Event
Contributing
o Developer's Guide
o Issue Tracker
o python-dev list
o Core Mentorship
o Report a Security Issue
Help & General Contact
Diversity Initiatives
Submit Website Bug
Status
Copyright ©2001-2024. Python Software Foundation Legal Statements Privacy Policy