Code · 2 files

Sample Python Files

Python is a general-purpose language popular for scripting, data science and web backends. The Python sample is a small program — a customer record, a VIP check and a formatted total — that is the same in every language we offer, so you can compare them side by side.

All 2 python files

Download all with curl
Download 2 files (214 KB)Shell
# 2 files, 214 KB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/code/py/sample.py
https://files.samplefiles.com/code/py/sample-10000-lines.py
EOF
FileSizeDetailsDownload
Sample Python filesample.py620 BDownload
Large Python file (about 10,000 lines)sample-10000-lines.py213 KB9,995 linesDownload