Code · Best AI for
Python coding
Writing, fixing and refactoring Python: scripts, web back-ends, data pipelines and the like.
Answer: Claude Opus 5.5 (Anthropic)

Claude Opus 5.5 from Anthropic is the best pick today (92/100), followed by GPT-6 Astra and Claude Fable 5. SWE-bench Verified is built entirely from real bugs in popular Python projects (Django, scikit-learn, sympy…), and SciCode asks for scientific Python. The general coding tests fill in the rest.
Top 15 for Python coding
Score = share of today's AI models it beats on the tests below (100 = best of all).
- 1Claude Opus 5.5Anthropic · a few tests92
- 2GPT-6 AstraOpenAI · a few tests91
- 3Claude Fable 5Anthropic · a few tests86
- 4Claude Opus 5Anthropic · a few tests86
- 5Claude Sonnet 5.5Anthropic · a few tests86
- 6Claude Opus 4.7Anthropic · a few tests83
- 7Claude Opus 4.6Anthropic · plenty of tests80
- 8Gemini 4 ArgonGoogle · a few tests78
- 9GPT-5.5OpenAI · plenty of tests78
- 10Claude Opus 4.5Anthropic · a few tests78
- 11Gemini 3 FlashGoogle · a few tests76
- 12Qwen3.7-MaxAlibaba (Qwen) · a few tests73
- 13Kimi K3Moonshot AI (Kimi) · a few tests71
- 14GLM-5.3Z.ai (Zhipu) · a few tests71
- 15Kimi K2.6Moonshot AI (Kimi) · a few tests70
Best overall
Score 92 · Anthropic · $0.96 per job
Best under $1
Score 68 · DeepSeek · $0.148 per job
Best open source
Score 71 · Moonshot AI (Kimi) · $0.72 per job
What it costs to fix one bug in a mid-size Python project
≈ 200K tokens read and 8K written per job, at each model's list API price. Monthly chat-app plans don't charge per job.
| Model | Score | Per job | Per 1,000 jobs | Memory |
|---|---|---|---|---|
| Claude Opus 5.5 | 92 | $0.96 | $960 | 1M |
| GPT-6 Astra | 91 | $2.40 | $2,400 | 1.1M |
| Claude Fable 5 | 86 | $2.40 | $2,400 | 1M |
| Claude Opus 5 | 86 | $1.20 | $1,200 | 1M |
| Claude Sonnet 5.5best value | 86 | $0.48 | $480 | 1M |
| Claude Opus 4.7 | 83 | $1.20 | $1,200 | 1M |
| Claude Opus 4.6 | 80 | $1.20 | $1,200 | 1M |
| Gemini 4 Argon | 78 | $0.48 | $480 | 1M |
| GPT-5.5 | 78 | $1.24 | $1,240 | 1.1M |
| Claude Opus 4.5 | 78 | $1.20 | $1,200 | 200K |
| Gemini 3 Flash | 76 | $0.124 | $124 | 1M |
| Qwen3.7-Max | 73 | $0.56 | $560 | 1M |
| Kimi K3 | 71 | $0.72 | $720 | 1M |
| GLM-5.3 | 71 | $0.315 | $315 | 1M |
| Kimi K2.6 | 70 | $0.222 | $222 | 262K |
Highlighted: the cheapest model within 15% of the top score.
Tests behind this ranking
Share = how much each test counts towards the score.
| SWE-bench VerifiedCan it fix real bugs in real Python projects? | 28% |
| DeepSWECan it build big new features in code nobody has solved online? | 15% |
| SWE-bench MultilingualCan it fix real bugs in projects written in many coding languages? | 13% |
| SciCodeCan it write the code scientists use in real research? | 11% |
| SWE-bench Verified (bash only)Who fixes bugs best when every model gets the same plain tools? | 7% |
| FrontierCodeWould a project's real owner actually accept the AI's code? | 6% |
| FrontierSWECan it finish huge engineering projects that take most of a day? | 5% |
| CursorBenchHow well does it help real coders inside the Cursor code editor? | 5% |
| MirrorCodeCan it rebuild a whole program just by watching what it does? | 4% |
| Terminal-BenchCan it get real jobs done by typing commands in a terminal? | 3% |
| Aider polyglotCan it solve tricky coding exercises in six different languages? | 2% |
| LiveBenchCan it pass a test with fresh questions it can't have memorized? | 1% |
Tips
- For one-off scripts almost any model in the top 20 is fine. The gap shows on big, messy codebases.
- Agent tools (Claude Code, Codex, Cursor) re-read your files many times, so the price per job matters more than the price per message.
Quick answers
What's the best AI for Python?
Claude Opus 5.5 from Anthropic is the best pick today (92/100), followed by GPT-6 Astra and Claude Fable 5.
About Claude Opus 5.5 →What's the best cheap AI for Python coding?
DeepSeek-V4-Pro: 68/100 for about $0.99 per million tokens. One job (fix one bug in a mid-size Python project) costs about $0.148.
See the details →What's the best open-source AI for Python coding?
Kimi K3 from Moonshot AI (Kimi), scoring 71/100. You can download it and run it yourself.
See the details →How much does it cost to fix one bug in a mid-size Python project with AI?
With Claude Opus 5.5, about $0.96 (≈ 200K tokens read, 8K written, at list API prices). Claude Sonnet 5.5 scores nearly as well for $0.48. Chat apps on a monthly plan don't charge per job.
How is this decided?
SWE-bench Verified is built entirely from real bugs in popular Python projects (Django, scikit-learn, sympy…), and SciCode asks for scientific Python. The general coding tests fill in the rest.
How scores work →