Category:Python
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Interpreted |
---|---|
Garbage collected: | Yes |
Type safety: | Safe |
Type strength: | Strong |
Type expression: | Implicit |
Type checking: | Dynamic |
See Also: |
From the official Python website: "Python is a dynamic object-oriented programming language that can be used for many kinds of software development."
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, <lang python></lang>
tags. This will make it easier to copy code into and out of the wiki. Example:
- <lang python>print 'this line must not have leading indentation!'
if True:
print 'example: ', foo(3), len(bar)</lang>
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
Subcategories
This category has the following 18 subcategories, out of 18 total.
@
- Python Implementations (8 P)
- Python User (345 P)
K
- Kivy (1 P)
L
- Livewires (1 P)
M
- Matplotlib (3 P)
N
- NumPy (13 P)
T
- Tkinter (8 P)
V
- VPython (9 P)
W
- WxPython (3 P)
Pages in category "Python"
The following 200 pages are in this category, out of 1,520 total.
(previous page) (next page)P
- Pragmatic directives
- Price fraction
- Price list behind API
- Primality by trial division
- Primality by Wilson's theorem
- Prime conspiracy
- Prime decomposition
- Prime numbers which contain 123
- Prime reciprocal sum
- Prime triangle
- Prime triplets
- Prime words
- Primes - allocate descendants to their ancestors
- Primes whose sum of digits is 25
- Primes with digits in nondecreasing order
- Primes: n*2^m+1
- Primorial numbers
- Print debugging statement
- Print itself
- Priority queue
- Probabilistic choice
- Problem of Apollonius
- Product of divisors
- Product of min and max prime factors
- Program name
- Program termination
- Proper divisors
- Pseudo-random numbers/Combined recursive generator MRG32k3a
- Pseudo-random numbers/Middle-square method
- Pseudo-random numbers/PCG32
- Pseudo-random numbers/Splitmix64
- Pseudo-random numbers/Xorshift star
- Pseudorandom number generator image
- Pythagoras tree
- Pythagorean quadruples
- Pythagorean triples
Q
R
- Radical of an integer
- Railway circuit
- Rainbow
- Ramanujan primes
- Ramanujan's constant
- Ramer-Douglas-Peucker line simplification
- Ramsey's theorem
- Random Latin squares
- Random number generator (device)
- Random number generator (included)
- Random numbers
- Random sentence from book
- Range consolidation
- Range expansion
- Range extraction
- Range modifications
- Ranking methods
- Rare numbers
- Rate counter
- Ray-casting algorithm
- RCRPG
- Read a configuration file
- Read a file character by character/UTF8
- Read a file line by line
- Read a specific line from a file
- Read entire file
- Readline interface
- Real constants and functions
- Recaman's sequence
- Record sound
- Red black tree sort
- Reduced row echelon form
- Reflection/Get source
- Reflection/List methods
- Reflection/List properties
- Regular expressions
- Remove duplicate elements
- Remove lines from a file
- Remove vowels from a string
- Rename a file
- Rendezvous
- Rep-string
- Repeat
- Repeat a string
- Repunit primes
- Resistance calculator
- Resistance network calculator
- Resistor mesh
- Respond to an unknown method call
- Retrieve and search chat history
- Return multiple values
- Reverse a string
- Reverse the gender of a string
- Reverse the order of lines in a text file while preserving the contents of each line
- Reverse words in a string
- Rhonda numbers
- Rice coding
- Riordan numbers
- RIPEMD-160
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Roots of a function
- Roots of a quadratic function
- Roots of unity
- Rosetta Code/Count examples
- Rosetta Code/Find bare lang tags
- Rosetta Code/Find unimplemented tasks
- Rosetta Code/Fix code tags
- Rosetta Code/Rank languages by number of users
- Rosetta Code/Rank languages by popularity
- Rot-13
- Round-robin tournament schedule
- RPG attributes generator
- RSA code
- Run as a daemon or service
- Run-length encoding
- Runge-Kutta method
- Runtime evaluation
- Runtime evaluation/In an environment
S
- S-expressions
- Safe addition
- Safe and Sophie Germain primes
- Safe primes and unsafe primes
- Sailors, coconuts and a monkey problem
- Same fringe
- Sattolo cycle
- Scope modifiers
- Scope/Function names and labels
- Search a list
- Search a list of records
- Search in paragraph's text
- Secure temporary file
- SEDOLs
- Selection bias in clinical sciences
- Selectively replace multiple instances of a character within a string
- Self numbers
- Self-describing numbers
- Self-hosting compiler
- Semiprime
- Semordnilap
- SEND + MORE = MONEY
- Send an unknown method call
- Send email
- Separate the house number from the street name
- Sequence of non-squares
- Sequence of primes by trial division
- Sequence of primorial primes
- Sequence: nth number with exactly n divisors
- Sequence: smallest number greater than previous term with exactly n divisors
- Sequence: smallest number with exactly n divisors
- Set
- Set consolidation
- Set of real numbers
- Set puzzle
- Set right-adjacent bits
- Set, the card game
- Seven-sided dice from five-sided dice
- Sexy primes
- SHA-1
- SHA-256
- SHA-256 Merkle tree
- Shape-Machine
- Shell one-liner
- Shift list elements to left by 3
- Shoelace formula for polygonal area
- Short-circuit evaluation
- Shortest common supersequence
- Show ASCII table
- Show the (decimal) value of a number of 1s appended with a 3, then squared
- Show the epoch
- Sierpinski arrowhead curve
- Sierpinski carpet
- Sierpinski curve
- Sierpinski pentagon
- Sierpinski square curve
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Sieve of Pritchard
- Simple database
- Simple turtle graphics
- Simple windowed application
- Simulate input/Keyboard
- Simulate input/Mouse
- Simulated optics experiment/Data analysis
- Simulated optics experiment/Simulator
- Sine wave
- Singleton
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Element removal
- Singly-linked list/Traversal
- Singular value decomposition
- Sisyphus sequence
- Sleep