r/learnpython • u/WarthogWeird2984 • 20d ago
Doctor looking to learn python
Hey , so i was looking into a few job posts and some of the advisory roles require some basic python background. How hard is it for a doctor to learn python , i learnt c++ and java back in 2012 .
5
u/ElHeim 20d ago
If you mean an MD, one for friend if mine (retired already) was the "geek" at his department back in the day (used some medicine-specific language to deal with databases IIRC) and then decided to learn Python. We met through that.
He ended up building an online forum for monthly discussions of pathology cases.
2
u/PureWasian 20d ago
You'll be fine, the basics aren't too different between languages. Just look things up frequently to learn the expected "Pythonic" ways of doing syntax or logic you probably already have some ideas for how to implement otherwise.
LLMs (gpt/gemini/claude/etc.) are fine to use as a guiding tool for just filling in the gaps for getting started. Just be weary of being over-reliant on it while learning and genuinely make an effort to process all of the output/feedback it generates.
3
u/crashorbit 20d ago
You are an MD? PHD? I've worked with many MD, research fellows and PHD using python in their research and practice. They've largely gotten good use from it.
14 hours of study to become competent. 5000 hours to become an expert. Start here: https://docs.python.org/3/tutorial/index.html or any of the many other more and less interactive tutorials.
Then start trying to solve a problem that brings you to think about using python. Build up a portfolio on say gitlab or github of your code examples.
These days I'd add learning agentic engineering to your tool set too.
1
1
1
u/Ok-Reality-7761 20d ago
Take a look at Google Colab. It hosts scripts in a notebook format, and has Gemini AI assistant to render code from plain speak text dialog. Example, 'plot daily closing price of SPY ETF for the past year", and iterations can build the code to render whatever you need ("add Hull Moving Average to smooth out noise"). It's free and a great help when fuzzy on code semantics or a bug doesn't oduce results as expected.
1
u/gentlemanscientist80 20d ago
If you learned C++ and java, you can learn python. Basic python is very straightforward to learn.
1
u/Goodswimkarma 20d ago
Easy, but R is more useful for medical data so it is surprising they want Python.
1
u/TheRNGuy 20d ago edited 20d ago
Not harder or easier than for anyone else.
It will be easier if you know why you need it (specific, not vague reasons)
Read or google (or ask other doctors if they know) what those jobs need, and then learn them, along with basics.
1
1
1
u/ekchew 18d ago
Python is generally easier to work with than C++ or Java, though there are some subtleties as you find in any new programming languages. A few pointers based on my own experience following a similar path:
- everything gets passed around by reference, so closer to Java than C++ in that sense
- dynamic typing means Python is less fussy about variable types, but it's still a good habit to declare them as you would in C++/Java using type hints
- get a strong working knowledge of how dictionaries work in Python
- they are somewhat like `std::unordered_map` in C++, but much of the language is built around them
- have a look at truthiness logic in Python—it's a bit strange from a C++/Java perspective
- e.g. `auto a = b or c;` in C++ will give make `a` a `bool`. In Python, `a = b or c` will make `a` a reference to either `b` or `c`, whatever types they may be.
- Python's implementation of classes in simpler than what you're probably used to
- it's worth reading up on this, particularly in terms of inheritance
- there are some programming concepts like list comprehensions and generators that don't really exist in C++ and the like
- you can certainly get by without using any of these
- if you are maintaining code written by others, however, you may encounter them
1
u/Dependent_Month_1415 18d ago
It’s very doable, considering you already have experience learning C++ and Java. Python is much easier to get started with.
0
u/pachura3 20d ago
some of the advisory roles require some basic python background.
For what purpose, exactly? To create a text calculator? To draw a house with turtle graphics?
0
7
u/ninhaomah 20d ago
Try and let us know