Category:Python: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(update)
 
(90 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{language
[http://discussions.csbsju.edu/general/messages/25/gyxex-235.html cialis online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=358 free sonyericsson ringtones] [http://ryu-jounetsu.blogspot.com canadian casino online] [http://rochili.jubiiblog.de/ cheap cyclobenzaprine] [http://www.forumhosting.org/forum.php?mforum=laoubo qwest ringtones] [http://ricvicna.blogdiario.com/ polyphonic ringtones] [http://pasbasor.blogdiario.com/ buy ultram] [http://eltc4tric.jubiiblog.de/ order xanax] [http://www.csun.edu/learningnet/discussion/file.php?0,file=142 free tracfone ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1121 qwest ringtones] [http://ellapas.jubiiblog.de/ lipitor online] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=312&FORUM_ID=3&CAT_ID=3 cheap ultram] [http://www.csun.edu/learningnet/discussion/file.php?0,file=136 buy nexium] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$118 free sony ericsson ringtones] [http://discussions.csbsju.edu/general/messages/25/xyli-236.html ativan online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832257) order xenical] [http://www.rso.cmich.edu/prevet/messageboard/000031b1.htm cialis online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$91 cheap carisoprodol] [http://www.forumhosting.org/forum.php?mforum=laerzel free sagem ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031b4.htm cheap meridia] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1120 free nextel ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832194) tramadol] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=317 carisoprodol online] [http://bondich.blogspot.com mixing valium and xanax] [http://eltaric.blogdiario.com/ cheap norco] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/xikuzo.htm valium online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=322 buy cyclobenzaprine] [http://pasbasbas.jubiiblog.de/ clonazepam online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832216) free kyocera ringtones] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=317&FORUM_ID=3&CAT_ID=3 adipex online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1131 sonyericsson ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031ac.htm generic carisoprodol] [http://www.csun.edu/learningnet/discussion/file.php?0,file=130 hydrocodone online] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/ronut.htm free sony ericsson ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=334 cheap meridia] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1108 zanaflex online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1129 free cingular ringtones] [http://raccaelt.jubiiblog.de/ viagra online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=369 free wwe ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/digesyv.htm free nokia ringtone] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832225) free mtv ringtones] [http://eltvivi.blogdiario.com/ vicodin online] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/bipivu.htm cheap meridia] [http://www.forumhosting.org/forum.php?mforum=getcoro sony ericsson ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832238) free sagem ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832236) qwest ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832243) free sony ringtones] [http://www.forumhosting.org/forum.php?mforum=coephrai cheap tramadol] [http://www.rso.cmich.edu/prevet/messageboard/000031d2.htm free qwest ringtone] [http://letocoer.jubiiblog.de/ polyphonic ringtones] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=310&FORUM_ID=3&CAT_ID=3 but xanax] [http://www.csun.edu/learningnet/discussion/file.php?0,file=155 free sagem ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/ciby.htm free funny ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=356 sony ericsson ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=121 viagra online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=141 free ringtones] [http://ricrotroc.blogdiario.com/ samsung ringtones] [http://eltlili.jubiiblog.de/ buy ambien] [http://ouglova.blogspot.com valium half life] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832248) buy ultram] [http://www.csun.edu/learningnet/discussion/file.php?0,file=157 free sony ericsson ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/rujop.htm cheap phentermine] [http://woolygrrl.blogspot.com valium side effects] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$134 valium online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$95 cheap diazepam] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/tubonyh.htm samsung ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1113 cheap hoodia] [http://acdronou.jubiiblog.de/ cheap diazepam] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832224) mp3 ringtones] [http://alcodom.blogdiario.com/ viagra online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=370 xanax] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832241) cheap soma] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=312 but adipex] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=318 cialis online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1105 pharmacy online online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1066 soma online] [http://coracou.jubiiblog.de/ hydrocodone online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1094 buy didrex] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1087 lorazepam online] [http://www.forumhosting.org/forum.php?mforum=covarrel funny ringtones] [http://lasitdron.jubiiblog.de/ cheap sildenafil] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1084 cheap levitra] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/nyzihyp.htm tracfone ringtones] [http://manka-kapak.blogspot.com casino craps online] [http://www.rso.cmich.edu/prevet/messageboard/000031c8.htm free ringtones] [http://www.forumhosting.org/forum.php?mforum=oudronacel didrex online] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/kukoti.htm generic cialis] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/sinyfu.htm mp3 ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832228) free nextel ringtones] [http://ervarli.blogdiario.com/ free jazz ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=148 free motorola ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832235) free punk ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832253) buy wellbutrin] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832204) cool ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$88 free alltel ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1134 alltel ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=361 tramadol online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$106 free nokia ringtones] [http://discussions.csbsju.edu/general/messages/25/xyvi-237.html but viagra] [http://www.rso.cmich.edu/prevet/messageboard/000031b5.htm generic adipex] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832230) cheap norco] [http://www.csun.edu/learningnet/discussion/file.php?0,file=134 order wellbutrin] [http://www.csun.edu/learningnet/discussion/file.php?0,file=132 lorazepam online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832234) propecia online] [http://alcta.blogdiario.com/ sprint ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1092 ultracet] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1100 zoloft online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1136 free cool ringtones] [http://liboor.jubiiblog.de/ free tracfone ringtones] [http://letorolac.jubiiblog.de/ motorola ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832201) cheap cialis] [http://www.rso.cmich.edu/prevet/messageboard/000031c5.htm cheap levitra] [http://domvimon.jubiiblog.de/ norco online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1068 phentermine online] [http://ertral.jubiiblog.de/ but carisoprodol] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1074 cheap cialis] [http://enchanted1312.blogspot.com injecting valium] [http://www.forumhosting.org/forum.php?mforum=ricrolget music ringtones] [http://el5or5ro.blogdiario.com/ motorola ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031c3.htm clonazepam online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1128 polyphonic ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/lusuli.htm viagra online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$113 free sagem ringtones] [http://bocoleto.jubiiblog.de/ free alltel ringtones] [http://discussions.csbsju.edu/general/messages/25/lepef-234.html diazepam online] [http://discussions.csbsju.edu/general/messages/25/dyjys-243.html adipex online] [http://discussions.csbsju.edu/general/messages/25/zisi-231.html xanax online] [http://olorolacel.blogdiario.com/ cheap diazepam] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832220) order meridia] [http://www.forumhosting.org/forum.php?mforum=vartrocvi free verizon ringtones] [http://www.forumhosting.org/forum.php?mforum=safunder viagra online] [http://algettr.blogdiario.com/ cheap carisoprodol] [http://www.rso.cmich.edu/prevet/messageboard/000031b7.htm vicodin online] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=315&FORUM_ID=3&CAT_ID=3 viagra online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$96 fioricet online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1112 order flexeril] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/jeziluc.htm generic adipex] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=302&FORUM_ID=3&CAT_ID=3 cheap soma] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832222) free mono ringtones] [http://tavidel.blogdiario.com/ sony ericsson ringtones] [http://www.forumhosting.org/forum.php?mforum=yohiatt meridia online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$135 verizon ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/pixe.htm free cingular ringtone] [http://livisit.blogdiario.com/ cheap valium] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/pypybug.htm free nextel ringtone] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/cicyfi.htm free polyphonic ringtone] [http://boricdom.blogdiario.com/ free nextel ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$107 norco online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=335 midi ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$100 cheap meridia] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=351 free real ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=323 cheap diazepam] [http://roacpas.jubiiblog.de/ but ultram] [http://cnac4tco.blogdiario.com/ mp3 ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1081 but alprazolam] [http://www.rso.cmich.edu/prevet/messageboard/000031da.htm free samsung ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=359 sprint ringtones] [http://cozelrol.jubiiblog.de/ xenical] [http://olobasno.jubiiblog.de/ free samsung ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=126 buy alprazolam] [http://domrelchi.jubiiblog.de/ cheap nexium] [http://cnatadel.blogdiario.com/ buy xanax] [http://www.rso.cmich.edu/prevet/messageboard/000031d7.htm motorola ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=128 but paxil] [http://vizelsit.jubiiblog.de/ free free ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1099 cheap lisinopril] [http://discussions.csbsju.edu/general/messages/25/wykypof-226.html cheap tramadol] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/nikol.htm cheap ultram] [http://www.forumhosting.org/forum.php?mforum=wiwhistl vicodin online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1076 cheap viagra] [http://kleinerachel.blogspot.com valium ativan] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832210) fioricet] [http://www.forumhosting.org/forum.php?mforum=aceldarro sonyericsson ringtones] [http://cnacorel.blogdiario.com/ mono ringtones] [http://eltrli.jubiiblog.de/ cheap vicodin] [http://www.csun.edu/learningnet/discussion/file.php?0,file=120 ativan] [http://taoudel.blogdiario.com/ sildenafil online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=159 free alltel ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=365 free verizon ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=338 free mp3 ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1098 but albuterol] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/colivew.htm alltel ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1119 mp3 ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832203) clonazepam online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=352 sagem ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=345 paxil online] [http://wildomania.blogspot.com ambien sleep walking] [http://eltsitzel.blogdiario.com/ sagem ringtones] [http://www.forumhosting.org/forum.php?mforum=cnataco free nokia ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=367 vicodin online] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=318&FORUM_ID=3&CAT_ID=3 norco online] [http://boroltroc.jubiiblog.de/ free funny ringtones] [http://dar5or5tr.blogdiario.com/ free midi ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=363 cheap ultram] [http://domdronpas.blogdiario.com/ cheap tramadol] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/nenopo.htm cheap tramadol] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/xoky.htm generic paxil] [http://ginny-potter21.blogspot.com caribbean casino gold online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1109 cheap diethylpropion] [http://www.csun.edu/learningnet/discussion/file.php?0,file=137 online ultracet] [[Category:Solutions by Programming Language]]
|exec=interpreted
From the official [http://www.python.org Python] web-site "Python is a dynamic object-oriented programming language that can be used for many kinds of software development."
|site=https://www.python.org
|strength=strong
|safety=safe
|express=implicit
|checking=dynamic
|parampass=object reference
|gc=yes
|LCT=yes
|bnf=https://docs.python.org/3/reference/grammar.html}}{{language programming paradigm|Dynamic}}{{language programming paradigm|Object-oriented}}{{codepad}}From the official [https://www.python.org Python] website: "Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs."


Python is very readable and easy to create clean bug-free programs due to the motto: "Errors should never pass silently."
It is easy to create clean bug-free programs in Python due to the motto: "Errors should never pass silently." Python is an [[wp:Interpreter (computing)|interpreter]]. Python source files (.py files) are typically compiled to an intermediate [[bytecode]] language (.pyc files) and executed by a Python Virtual Machine.

Python source files (.py files) are typically compiled to an intermediate bytecode language (.pyc files) and executed by a Python Virtual Machine.
===Notes===
Because Python uses whitespace for structure, do not format long code examples with leading whitespace, instead use <code><nowiki><pre></pre></nowiki></code> tags, or, preferably, <code><nowiki><syntaxhighlight lang="python"></syntaxhighlight></nowiki></code> tags. This will make it easier to copy code into and out of the wiki. Example:
<syntaxhighlight lang="python">print('this line must not have leading indentation!')
if True:
print('example: ', foo(3), len(bar))</syntaxhighlight>

Some Python examples may deviate from idiomatic Python because they may be written to work in Python 3.X as well as Python 2.X environments. This includes doing things like:
* Using brackets in print statements/functions of one expression.
* Using zip and not izip; keys(), values(), items() and not their iter- forms.
* Checking for raw_input and setting raw_input to input if not found.
* Conditionally importing reduce if it is not found.
This style is not a requirement for Python code on RC, but it may be in use and should not necessarily be 'corrected' if found in examples.

The command line is often used in Python for short pieces of code, and so, again; examples showing such use are not incorrect and may be left.


==See Also==
==See Also==
* [http://en.wikipedia.org/wiki/python_(programming_language) Wikipedia: Python]
* [[wp:python_(programming_language)|Wikipedia: Python]]

* [http://www.python.org The Python official site]
==Todo==
[[Tasks_not_implemented_in_Python]]

Latest revision as of 16:10, 21 August 2023

Language
Python
This programming language may be used to instruct a computer to perform a task.
Official website
Execution method: Interpreted
Garbage collected: Yes
Parameter passing methods: By object reference
Type safety: Safe
Type strength: Strong
Type expression: Implicit
Type checking: Dynamic
See Also:
Listed below are all of the tasks on Rosetta Code which have been solved using Python.
Try this language on Codepad.

From the official Python website: "Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs."

It is easy to create clean bug-free programs in Python due to the motto: "Errors should never pass silently." Python is an interpreter. Python source files (.py files) are typically compiled to an intermediate bytecode language (.pyc files) and executed by a Python Virtual Machine.

Notes

Because Python uses whitespace for structure, do not format long code examples with leading whitespace, instead use <pre></pre> tags, or, preferably, <syntaxhighlight lang="python"></syntaxhighlight> tags. This will make it easier to copy code into and out of the wiki. Example:

print('this line must not have leading indentation!')
if True:
    print('example: ', foo(3), len(bar))

Some Python examples may deviate from idiomatic Python because they may be written to work in Python 3.X as well as Python 2.X environments. This includes doing things like:

  • Using brackets in print statements/functions of one expression.
  • Using zip and not izip; keys(), values(), items() and not their iter- forms.
  • Checking for raw_input and setting raw_input to input if not found.
  • Conditionally importing reduce if it is not found.

This style is not a requirement for Python code on RC, but it may be in use and should not necessarily be 'corrected' if found in examples.

The command line is often used in Python for short pieces of code, and so, again; examples showing such use are not incorrect and may be left.

See Also

Todo

Tasks_not_implemented_in_Python

Subcategories

This category has the following 18 subcategories, out of 18 total.

K

L

M

N

P

S

T

V

W

Pages in category "Python"

The following 200 pages are in this category, out of 1,517 total.

(previous page) (next page)

A

(previous page) (next page)