Python

1 program Added 2025-10-22T09:45:48Z Model: meta-llama/llama-3.1-70b-instructTemp: 0.4 Evidence Report issue View issues
Aliases: Py
Provenance: commit f11bdc136f · authored 2025-10-22T11:45:48+02:00 · model meta-llama/llama-3.1-70b-instruct

Sources mentioning this language

8 sources · pl_id: pl/python
LLM (this repo) · 1LinguistPygmentsWikipediaEsolangHyperpolyglotRosettacodeWikidata · Q28865

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: object-oriented · procedural (imperative) · functional · structured · reflective
Typingduck, dynamic, strong; optional type annotations
Designed byPython Software Foundation · Guido van Rossum
First appeared1991
Influenced byABC · Ada · ALGOL 68 · APL · C · C++ · CLU · Dylan · Haskell · Icon · Lisp · Modula-3 · Perl · Standard ML
LicensePython Software Foundation License
Homepagehttps://www.python.org/

Extensions claimed by this language

37 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.pylinguistprimary455.0M files
.pypygmentsprimary455.0M files
.buckpygmentssecondary197 files
.buildpygmentssecondary1.1M files
.bzlpygmentssecondary376.5K files
.cgilinguistsecondary461.7K files
.fcgilinguistsecondary11.6K files
.gyplinguistsecondary184.6K files
.gypilinguistsecondary346.8K files
.jypygmentssecondary5.0K files
.lmilinguistsecondary91 files
.py3linguistsecondary17.5K files
.pydelinguistsecondary35.6K files
.pyilinguistsecondary844.5K files
.pyipygmentssecondary844.5K files
.pyplinguistsecondary2.5K files
.pytlinguistsecondary11.0K files
.pywlinguistsecondary114.6K files
.pywpygmentssecondary114.6K files
.rpylinguistsecondary384.6K files
.sagepygmentssecondary53.5K files
.scpygmentssecondary588.1K files
.sconscriptpygmentssecondary2.0K files
.sconstructpygmentssecondary255 files
.speclinguistsecondary6.1M files
.taclinguistsecondary63.6K files
.tacpygmentssecondary63.6K files
.workspacepygmentssecondary68.3K files
.wsgilinguistsecondary48.8K files
.xpylinguistsecondary1.2K files
.pywikidatadeprecated455.0M files
.pycwikidatadeprecated521.5M files
.pydwikidatadeprecated430.4K files
.pyiwikidatadeprecated844.5K files
.pyowikidatadeprecated1.4M files
.pywwikidatadeprecated114.6K files
.pyzwikidatadeprecated47.0K files

Related languages

IronPython (0.37)JPython (0.36)ChocoPy (0.33)Pyth (0.33)Jython (0.29)

LLM-contributed programs

Guessing Game

Provenance: commit f11bdc136f · authored 2025-10-22T11:45:48+02:00 · model meta-llama/llama-3.1-70b-instruct · Temp 0.4
code.py · license: PSF License · added: 2025-10-22T09:45:48Z
import random

number_to_guess = random.randint(1, 10)

while True:
    user_guess = int(input('Guess our number (between 1 and 10): '))
    if user_guess == number_to_guess:
        print('Congratulations! You won!')
        break
    elif user_guess < number_to_guess:
        print('Too low!')
    else:
        print('Too high!')

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.rpy/0.rpypredicates[{"kind": "any", "regexes": ["^(import|from|class|def)\\s"]}]

Contribute — propose a file extension

Tell us where to find evidence about Python (mapped to pl/python). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Python/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← PythJS Python (programming language) →