Category: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: |
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
Subcategories
This category has the following 18 subcategories, out of 18 total.
@
- Python Implementations (8 P)
- Python User (349 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,534 total.
(previous page) (next page)E
- Euler's identity
- Euler's sum of powers conjecture
- Evaluate binomial coefficients
- Even numbers which cannot be expressed as the sum of two twin primes
- Even or odd
- Events
- Evolutionary algorithm
- Exactly three adjacent 3 in lists
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Executable library
- Execute a Markov algorithm
- Execute a system command
- Execute Brain****
- Execute Computer/Zero
- Execute CopyPasta Language
- Execute HQ9+
- Execute SNUSP
- Exponential digital sums
- Exponentiation operator
- Exponentiation order
- Exponentiation with infix operators in (or operating on) the base
- Extend your language
- Extended Straddling Checkerboard
- Extensible prime generator
- External sort
- Extra primes
- Extract file extension
- Extreme floating point values
- Extreme primes
F
- Faces from a mesh
- Factor-perfect numbers
- Factorial
- Factorial base numbers indexing permutations of a collection
- Factorial primes
- Factorions
- Factorize string into Lyndon words
- Factors of a Mersenne number
- Factors of an integer
- Fairshare between two and more
- Farey sequence
- Fast Fourier transform
- FASTA format
- Faulhaber's formula
- Faulhaber's triangle
- Feigenbaum constant calculation
- Fermat numbers
- Fibonacci heap
- Fibonacci matrix-exponentiation
- Fibonacci n-step number sequences
- Fibonacci sequence
- Fibonacci word
- Fibonacci word/fractal
- File extension is in extensions list
- File input/output
- File modification time
- File size
- File size distribution
- Filter
- Find adjacent primes which differ by a square integer
- Find Chess960 starting position identifier
- Find common directory path
- Find duplicate files
- Find first and last set bit of a long integer
- Find first missing positive
- Find if a point is within a triangle
- Find largest left truncatable prime in a given base
- Find limit of recursion
- Find minimum number of coins that make a given value
- Find palindromic numbers in both binary and ternary bases
- Find prime n such that reversed n is also prime
- Find prime numbers of the form n*n*n+2
- Find square difference
- Find squares n where n+1 is prime
- Find the intersection of a line with a plane
- Find the intersection of two lines
- Find the last Sunday of each month
- Find the missing permutation
- Find words which contain the most consonants
- Find words which contains all the vowels
- Find words which contains more than 3 e vowels
- Find words whose first and last three letters are equal
- Find words with alternating vowels and consonants
- Finite state machine
- First 9 prime Fibonacci number
- First class environments
- First perfect square in base n with n unique digits
- First power of 2 that has leading decimal digits of 12
- First-class functions
- First-class functions/Use numbers analogously
- Five weekends
- Fivenum
- Fixed length records
- FizzBuzz
- Flatten a list
- Flipping bits game
- Flow-control structures
- Floyd's triangle
- Floyd-Warshall algorithm
- Forbidden numbers
- Forest fire
- Fork
- Formal power series
- Formatted numeric output
- Fortunate numbers
- Forward difference
- Four bit adder
- Four is magic
- Four is the number of letters in the ...
- Four sides of square
- Fractal tree
- Fraction reduction
- Fractran
- Free polyominoes enumeration
- Frobenius numbers
- FTP
- Function composition
- Function definition
- Function frequency
- Functional coverage tree
- Fusc sequence
G
- Galton box animation
- Gamma function
- Gapful numbers
- Gauss-Jordan matrix inversion
- Gaussian elimination
- Gaussian primes
- General FizzBuzz
- Generate Chess960 starting position
- Generate lower case ASCII alphabet
- Generate random chess position
- Generate random numbers without repeating a value
- Generator/Exponential
- Generic swap
- Geohash
- Geometric algebra
- Get system command output
- Getting the number of decimal places
- Giuga numbers
- Globally replace text in several files
- Go Fish
- Goldbach's comet
- Golden ratio/Convergence
- Goodstein Sequence
- Graph colouring
- Gray code
- Grayscale image
- Greatest common divisor
- Greatest element of a list
- Greatest prime dividing the n-th cubefree number
- Greatest subsequential sum
- Greedy algorithm for Egyptian fractions
- Greyscale bars/Display
- GSTrans string conversion
- Guess the number
- Guess the number/With feedback
- Guess the number/With feedback (player)
- GUI component interaction
- GUI enabling/disabling of controls
- GUI/Maximum window dimensions
H
- Hailstone sequence
- Halt and catch fire
- Hamming numbers
- Handle a signal
- Happy numbers
- Harmonic series
- Harshad or Niven series
- Hash from two arrays
- Hash join
- Hashtron inference
- Haversine formula
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newbie
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Text
- Hello world/Web server
- Here document
- Heronian triangles
- Hex dump
- Hex words
- Hexapawn
- Hickerson series of almost integers
- Higher-order functions
- Hilbert curve
- History variables
- Hofstadter Figure-Figure sequences
- Hofstadter Q sequence
- Hofstadter-Conway $10,000 sequence
- Holidays related to Easter
- Home primes
- Honaker primes
- Honeycombs
- Horizontal sundial calculations
- Horner's rule for polynomial evaluation
- Host introspection
- Hostname
- Hough transform
- Hourglass puzzle