Skip to content

EvertonAlmeida/python-for-csharp-developers

Repository files navigation

Python for C# Developers

You know C#. You're good at it. But now you need Python — maybe for AI/ML, maybe for scripting, maybe because every other job posting asks for it.

This repo is for you.

What this is

A hands-on, lesson-by-lesson guide that teaches Python by building on what you already know from C#. No "what is a variable" basics. No pretending you've never written code before. Every concept starts with the C# way, then shows you the Python way — so you always have something familiar to anchor to.

Who this is for

  • C# developers who want to add Python as a second strong language
  • .NET engineers exploring AI/ML, data science, or automation
  • Anyone who's tired of Python tutorials that assume you've never seen a for loop

How to use this repo

Start with 00-setup to get Python installed and running on your machine. Then work through the numbered lessons in order:

Folder Topic What you'll learn
00-setup Setup Install Python, run a file, pick an editor
01-variables-and-types Variables & Types Dynamic typing, type hints, input/output
02-functions Functions Parameters, defaults, named args, return types
03-collections Collections Lists, dicts, tuples, and how they map to C#
More coming...

Each lesson folder contains:

  • README.md — The lesson itself, with side-by-side C# and Python comparisons
  • EXERCISES.md — Practice tasks to solidify what you learned
  • practice.py — Starter file with function stubs matching each exercise
  • solution.py — Gitignored. Your personal scratch file for implementing the exercises

Quick start

Already have Python 3.10+? Clone the repo and run the first lesson:

git clone https://github.com/EvertonAlmeida/python-for-csharp-developers.git
cd python-for-csharp-developers
python3 01-variables-and-types/practice.py

If you don't have Python installed yet, see 00-setup for a 5-minute walkthrough.

The story behind this repo

I'm a C# developer transitioning into AI engineering. Python kept showing up in every job description, every ML tutorial, every AI framework. So I decided to learn it properly — and document the journey in a way that would actually be useful to other developers making the same switch.

This isn't a polished course. It's a real learning path, built one lesson at a time, with all the "oh, that's how Python does it" moments captured along the way.

AI-assistant ready

This repo is set up to work with any major AI coding assistant. Each tool has its own instruction file telling it to teach, not write code — so if you open this repo in your editor and ask your AI for help, it'll explain concepts using C# comparisons instead of just handing you the answer.

AI Tool Instruction file
Claude Code CLAUDE.md
GitHub Copilot .github/copilot-instructions.md
Google Gemini GEMINI.md
OpenAI Codex AGENTS.md
Cursor .cursor/rules/python-for-csharp.mdc
Windsurf .windsurf/rules/python-for-csharp.md

If you use a different tool and know its instruction format, PRs are welcome.

Learning journal

The learning journal is where I document my thought process — what clicked, what surprised me, what I'd tell another C# developer about each topic. It's not a repeat of the lessons; it's the messy, honest part of learning that doesn't fit in code.

Contributing

If you're a C# developer learning Python too, or a Python developer who wants to help make the comparisons better — PRs are welcome. The goal is to make this the resource we all wished existed when we started.

License

MIT — use it, share it, learn from it.

About

A hands-on guide that teaches Python to C# developers — lesson by lesson, concept by concept.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages