python.org
域名年龄: 30年1个月21天HTTP/1.1 301 永久重定向 服务器:Varnish Retry-After: 0 目标网址:https://www.python.org/ 文件大小:0 接受单位:字节 访问时间:2016年12月14日 19:54:42 代理服务器:1.1 varnish 连接:关闭 X-Served-By: cache-sjc3626-SJC 缓存代理:HIT X-Cache-Hits: 0 X-Timer: S1481716482.564681,VS0,VE0 Public-Key-Pins: max-age=600; includeSubDomains; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="5C8kvU039KouVrl52D0eZSGf4Onjo4Khs8tmyTlV3nU="; pin-sha256="5C8kvU039KouVrl52D0eZSGf4Onjo4Khs8tmyTlV3nU="; pin-sha256="lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU="; pin-sha256="TUDnr0MEoJ3of7+YliBMBVFB4/gJsv5zO7IxD9+YoWI="; pin-sha256="x4QzPSC810K5/cMjb05Qm4k3Bw5zBn4lTdO/nEW/Td4="; Strict-Transport-Security: max-age=63072000; includeSubDomains HTTP/1.1 200 OK 服务器:nginx 类型:text/html; charset=utf-8 X-Frame-Options: SAMEORIGIN X-Clacks-Overhead: GNU Terry Pratchett 文件大小:47373 接受单位:字节 访问时间:2016年12月14日 19:54:42 代理服务器:1.1 varnish 文件时间(秒):1201 连接:keep-alive X-Served-By: cache-sjc3137-SJC 缓存代理:HIT X-Cache-Hits: 2 X-Timer: S1481716482.581661,VS0,VE0 动作:Cookie Public-Key-Pins: max-age=600; includeSubDomains; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="5C8kvU039KouVrl52D0eZSGf4Onjo4Khs8tmyTlV3nU="; pin-sha256="5C8kvU039KouVrl52D0eZSGf4Onjo4Khs8tmyTlV3nU="; pin-sha256="lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU="; pin-sha256="TUDnr0MEoJ3of7+YliBMBVFB4/gJsv5zO7IxD9+YoWI="; pin-sha256="x
Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.Skip to content▼ ClosePythonPSFDocsPyPIJobsCommunity▲ The Python Network≡ MenuSearch This SiteGOA ASmallerLargerResetSocializeGoogle+FacebookTwitterChat on IRCSign InSign Up / RegisterSign InAboutApplicationsQuotesGetting StartedHelpPython BrochureDownloadsAll releasesSource codeWindowsMac OS XOther PlatformsLicenseAlternative ImplementationsDocumentationDocsAudio/Visual TalksBeginner's GuideDeveloper's GuideFAQNon-English DocsPEP IndexPython BooksCommunityDiversityIRCMailing ListsPython ConferencesSpecial Interest GroupsPython WikiPython LogoMerchandiseCommunity AwardsSuccess StoriesArtsBusinessEducationEngineeringGovernmentScientificSoftware DevelopmentNewsPython NewsCommunity NewsPSF NewsPyCon NewsEventsPython EventsUser Group EventsPython Events ArchiveUser Group Events ArchiveSubmit an Event>_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 987Functions DefinedThe 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# Python 3: List comprehensions>>> fruits = ['Banana', 'Apple', 'Lime']>>> loud_fruits = [fruit.upper() for fruit in fruits]>>> print(loud_fruits)['BANANA', 'APPLE', 'LIME']# List and the enumerate function>>> list(enumerate(fruits))[(0, 'Banana'), (1, 'Apple'), (2, 'Lime')]Compound Data TypesLists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. More about lists in Python 3# Python 3: Simple arithmetic>>> 1 / 20.5>>> 2 ** 38>>> 17 / 3 # classic division returns a float5.666666666666667>>> 17 // 3 # floor division5Intuitive InterpretationCalculations are simple with Python, and expression syntax is straightforward: the operators +, -, * and / work as expected; parentheses () can be used for grouping. More about simple math functions in Python 3.# Python 3: Simple output (with Unicode)>>> print("Hello, I'm Python!")Hello, I'm Python!# Input, assignment>>> name = input('What is your name?\n')>>> print('Hi, %s.' % name)What is your name?PythonHi, Python.Quick & Easy to LearnExperienced programmers in any other language can pick up Python very quickly, and beginners find the clean syntax and indentation structure easy to learn. Whet your appetite with our Python 3 overview.# For loop on a list>>> numbers = [2, 4, 6, 8]&
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2025-05-09 19:27, Process in 0.0091 second.