Category:Python
![Language](http://static.miraheze.org/rosettacodewiki/thumb/2/27/Rcode-button-language-crushed.png/64px-Rcode-button-language-crushed.png)
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 (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)S
- Smallest enclosing circle problem
- Smallest multiple
- Smallest number k such that k+2^m is composite for all m less than k
- Smallest numbers
- Smallest power of 6 whose decimal expansion contains n
- Smallest square that begins with n
- Smarandache prime-digital sequence
- Smith numbers
- Snake
- Snake and ladder
- SOAP
- Sockets
- Sokoban
- Soloway's recurring rainfall
- Solve a Hidato puzzle
- Solve a Holy Knight's tour
- Solve a Hopido puzzle
- Solve a Numbrix puzzle
- Solve equations with substitution method
- Solve hanging lantern problem
- Solve the no connection puzzle
- Solve triangle solitaire puzzle
- Sorensen–Dice coefficient
- Sort a list of object identifiers
- Sort an array of composite structures
- Sort an integer array
- Sort an outline at every level
- Sort disjoint sublist
- Sort numbers lexicographically
- Sort primes from list to a list
- Sort stability
- Sort the letters of string in alphabetical order
- Sort three variables
- Sort using a custom comparator
- Sorting algorithms/Bead sort
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting Algorithms/Circle Sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Cocktail sort with shifting bounds
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Cycle sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Patience sort
- Sorting algorithms/Permutation sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Radix sort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Sorting algorithms/Sleep sort
- Sorting algorithms/Stooge sort
- Sorting algorithms/Strand sort
- Soundex
- Sparkline in unicode
- Special characters
- Special divisors
- Special factorials
- Special neighbor primes
- Special pythagorean triplet
- Special variables
- Speech synthesis
- Spelling of ordinal numbers
- Sphenic numbers
- Spinning rod animation/Text
- Spiral matrix
- Split a character string based on change of character
- SQL-based authentication
- Square but not cube
- Square-free integers
- Stable marriage problem
- Stack
- Stack traces
- Stair-climbing puzzle
- State name puzzle
- Statistics/Basic
- Statistics/Chi-squared distribution
- Statistics/Normal distribution
- Steady squares
- Steffensen's method
- Stem-and-leaf plot
- Stern-Brocot sequence
- Stirling numbers of the first kind
- Stirling numbers of the second kind
- Straddling checkerboard
- Strange numbers
- Strange plus numbers
- Strange unique prime triplets
- Strassen's algorithm
- Stream merge
- String append
- String case
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Strip block comments
- Strip comments from a string
- Strip control codes and extended characters from a string
- Strip whitespace from a string/Top and tail
- Strong and weak primes
- Sturmian word
- Sub-unit squares
- Subleq
- Subset sum problem
- Substitution cipher
- Substring
- Substring/Top and tail
- Subtractive generator
- Successive prime differences
- Sudan function
- Sudoku
- Suffix tree
- Suffixation of decimal numbers
- Sum and product of an array
- Sum and product puzzle
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of divisors
- Sum of elements below main diagonal of matrix
- Sum of first n cubes
- Sum of square and cube digits of an integer are primes
- Sum of squares
- Sum of the digits of n is substring of n
- Sum of two adjacent numbers are primes
- Sum to 100
- Summarize and say sequence
- Summarize primes
- Summation of primes
- Sunflower fractal
- Super-d numbers
- Super-Poulet numbers
- Superellipse
- Superpermutation minimisation
- Sutherland-Hodgman polygon clipping
- Sylvester's sequence
- Symmetric difference
- Sync subtitles
- Synchronous concurrency
- Syntax highlighting using Mediawiki formatting
- System time
T
- Table creation
- Table creation/Postal addresses
- Take notes on the command line
- Tarjan
- Tau function
- Tau number
- Taxicab numbers
- Teacup rim text
- Temperature conversion
- Terminal control/Clear the screen
- Terminal control/Coloured text
- Terminal control/Cursor movement
- Terminal control/Cursor positioning
- Terminal control/Dimensions
- Terminal control/Display an extended character
- Terminal control/Hiding the cursor
- Terminal control/Inverse video
- Terminal control/Positional read
- Terminal control/Preserve screen
- Terminal control/Ringing the terminal bell
- Terminal control/Unicode output
- Ternary logic
- Test a function
- Test integerness
- Tetris
- Text between
- Text processing/1
- Text processing/2
- Text processing/Max licenses in use
- Textonyms
- The ISAAC cipher
- The Name Game
- The sieve of Sundaram
- The Twelve Days of Christmas
- Thiele's interpolation formula
- Thue-Morse
- Tic-tac-toe
- Time a function
- Tokenize a string
- Tokenize a string with escaping
- Tonelli-Shanks algorithm
- Top rank per group
- Topic variable
- Topological sort
- Topological sort/Extracted top item
- Topswops
- Total circles area
- Totient function
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Transliterate English text using the Greek alphabet