
Ask HN: Learn Python coming from C# background - humanlion87
I have been coding in C#&#x2F;.NET for the past few years. Am interested in dabbling in some AI&#x2F;ML, especially applications related to healthcare and biology. Based on some quick research, it seems like I need to get familiar with Python before I dive into the actual ML stuff. I have never used Python before. There are innumerable resources on the web for learning Python and I am finding it hard to figure out which might be best. So I thought I would turn to the experienced HN crowd to get some feedback :). Any suggestions on material for the best way to get familiar with Python for a C# developer?<p>Thanks
======
curiousmindz
I know this doesn't answer your question directly, but depending on how much
time you intend to spend dabbling in AI/ML, it might not be worth it to first
learn a whole new programming environment.

So, you might be able to dabble enough while staying productive with C#. Take
a look at ML.NET: [https://docs.microsoft.com/en-us/dotnet/machine-
learning/](https://docs.microsoft.com/en-us/dotnet/machine-learning/)

Edit: And everything you learn from that experience will still be useful if
you decide later on to dive deeper with Python.

~~~
humanlion87
Thanks for the suggestion. I actually never considered this angle! I'll
definitely take a look at ML.NET and see whether that will suit my current
needs.

~~~
JaggerJo
also consider F# + ML.NET

------
0x54MUR41
I would recommend two books from No Starch Press:

1\. Python Crash Course
[https://nostarch.com/pythoncrashcourse2e](https://nostarch.com/pythoncrashcourse2e)

2\. Automate the Boring Stuff with Python
[https://nostarch.com/automatestuff2](https://nostarch.com/automatestuff2)

The first book will help you to understand the basic concept of programming
with Python. It also contains some projects that you can follow in the last
chapters. The second book is about automating stuff that are done manually.
Let's say, you usually do something over and over again. You can try to
automate them using Python. The key of learning programming is practice. If
you are curious about other book, you can check
[https://nostarch.com/catalog/python](https://nostarch.com/catalog/python).

I heard good stuff about Learn Python The Hard Way. But, I've never tried the
course. It's a paid course. You can take a look on
[https://learnpythonthehardway.org/python3/](https://learnpythonthehardway.org/python3/).

------
asicsp
I don't know about C#/.NET but I assume you are comfortable with general
programming concepts. There are several guides that can help you to quickly
familiarize with Python syntax. [0] [1]

For Python eco-system related concepts like virtual environment, testing, and
other modules, [2] is good.

I don't have any experience with AI/ML, [3] might help if you are looking for
books.

[0] [https://docs.python.org/3/tutorial/](https://docs.python.org/3/tutorial/)

[1]
[https://github.com/jakevdp/WhirlwindTourOfPython](https://github.com/jakevdp/WhirlwindTourOfPython)

[2] [https://calmcode.io/](https://calmcode.io/)

[3] [https://pythonbooks.org/topical-books/machine-learning-
and-a...](https://pythonbooks.org/topical-books/machine-learning-and-
artifical-intelligence/)

~~~
s1t5
I second the recommnedation for Whirlwind Tour of Python for people who
already know other programming languages and don't need to learn programming
concepts from scratch.

------
mattmanser
As someone who did this years ago, python is really easy to learn once you
know C# well.

The only complication is learning command line bullshit and basically
copypasta of hopefully benign incomprehensible commands rather than clear UIs,
which has been creeping into .Net anyway.

------
cpach
I like this book:
[http://openbookproject.net/thinkcs/python/english3e/](http://openbookproject.net/thinkcs/python/english3e/)
– it’s not so garrulous. Good for quickly looking up concepts.

Also check out the various community resources. The #python channel on
Freenode is good. On Reddit there is
[https://www.reddit.com/r/learnpython/](https://www.reddit.com/r/learnpython/)

------
matanrubin
The guys over at Talk Python has a dedicated course that sounds like what you
need:
[https://training.talkpython.fm/courses/explore_dotnet/python...](https://training.talkpython.fm/courses/explore_dotnet/python-
for-dotnet-developers)

I can't comment on the quality of the course as I haven't taken it, but
generally speaking Talk Python usually has high quality stuff.

Hope this helps!

------
jventura
These are some of the lab exercises that I give to my students to get them up
to speed with Python on my Distributed Systems course:
[https://github.com/joaoventura/full-speed-
python](https://github.com/joaoventura/full-speed-python)

They are 2nd year students which are mostly fluent in Java..

------
ggregoire
> best way to get familiar with Python for a C# developer?

Diving directly into the code.

Writing Python is very close to writing pseudo code. Google "how to do X" and
check the official doc when you need it.

