Why learn Python when we have AI?
For many people working in medicine, medical physics, biomedical research, and science, learning Python can seem like an increasingly strange investment of time.
Why spend weeks or months learning programming when AI can write Python code in seconds?
It is a fair question.
Today, you can ask an AI system to analyse a dataset, create a graph, process an image, perform a statistical test, or even build a complete machine-learning pipeline. The code may appear almost instantly.
So, do medical and scientific professionals still need to learn Python?
Yes — but perhaps not for the reason we used to.
The goal is no longer necessarily to become a programmer.
The goal is to develop enough computational understanding to work effectively with AI.
AI can write the code. But who decides what the code should do?
Imagine that you have a dataset containing measurements from a medical study.
You ask an AI assistant:
“Write Python code to compare these two groups and determine whether there is a statistically significant difference.”
The AI can probably produce the code.
But several important questions remain.
What statistical test should be used?
Are the groups independent?
Are the assumptions of the test satisfied?
Are there missing values?
Should the data be transformed?
What exactly does the resulting p-value mean?
Is statistical significance the same as clinical significance?
The difficult part was never simply typing the Python commands.
The difficult part is understanding the problem.
AI can help enormously with the implementation. But the responsibility for deciding whether the analysis is appropriate remains with the human.
This is particularly important in medicine and science, where an apparently reasonable result can still be scientifically wrong.
Python is becoming a form of computational literacy
We don’t stop learning mathematics because calculators exist.
We don’t stop learning statistics because statistical software exists.
And we don’t need to stop learning programming because AI can generate code.
Instead, the nature of the skill changes.
A scientist today may not need to write every piece of software from scratch. But they increasingly need to understand computational processes well enough to:
- formulate a computational problem,
- communicate it clearly to AI,
- understand the generated code,
- identify potential errors,
- test the result,
- modify the solution,
- and decide whether the output is scientifically meaningful.
That is computational literacy.
Python is one of the most accessible ways to develop it.
You don’t need to become a software engineer
This distinction is important.
A medical physicist does not necessarily need to become a professional Python developer.
A radiologist does not need to become a machine-learning engineer.
A biomedical researcher does not need to know everything about software architecture.
A student working with medical data does not need to spend years studying computer science.
But they can benefit enormously from understanding the fundamentals.
For example, knowing what a variable is, how a loop works, what a function does, how data are stored, and how a program moves from input to output can completely change the way you interact with AI-generated code.
Consider this simple example:
mean = sum(values) / len(values)
Someone with no programming knowledge may see this as something that AI produced and simply trust it.
Someone with basic Python knowledge can immediately understand:
Take all the values, add them together, and divide by the number of values.
That person can now question the code.
What if values contains missing data?
What if it is empty?
What if the values are not what we think they are?
What if the AI misunderstood the structure of the dataset?
Learning Python gives you the ability to interrogate the code rather than simply receive it.
AI becomes more useful when you understand what it is doing
There is an interesting paradox here.
AI makes programming easier.
But that may actually make programming knowledge more valuable, not less.
Why?
Because AI lowers the barrier to producing code, while increasing the amount of code that people can generate and use.
The bottleneck moves.
Previously, the bottleneck was often:
“Can I write this program?”
Increasingly, the bottleneck becomes:
“Do I understand what this program is doing, and can I tell whether it is correct?”
That is a very different skill.
And it is particularly important when AI is involved.
AI can generate code that looks convincing.
It can use the wrong function.
It can make incorrect assumptions about your data.
It can misunderstand a scientific concept.
It can produce code that works technically but answers the wrong question.
The code may run without producing an error — and still be wrong.
A computer executing code successfully does not mean that the scientific analysis is correct.
The human remains responsible for the question
One of the most important skills in an AI-assisted scientific environment is therefore not coding.
It is asking the right question.
Suppose you want to analyse medical images.
You might ask AI:
“Write Python code to calculate the average intensity in this image.”
That sounds straightforward.
But what does “intensity” mean?
What are the units?
What image format are you using?
Is the image calibrated?
Are you analysing the entire image or a region of interest?
Are there artefacts?
Has preprocessing changed the measurements?
What does the calculated average actually represent?
The quality of the final result depends not only on the code.
It depends on the scientific understanding behind the code.
Python gives you a way to express that understanding computationally.
AI can help you translate your intentions into code.
But it cannot take responsibility for the scientific question.
The future is not human versus AI
It is tempting to frame the development of AI as a competition.
Will AI replace programmers?
Will AI replace analysts?
Will AI replace scientists?
For many medical and scientific professionals, a more useful question is:
How can I become better at my work by working with AI?
That changes the perspective completely.
The future may look less like:
Human OR AI
and more like:
Human + AI + computational literacy
The human provides the scientific context, judgement, experience, and responsibility.
AI provides speed, assistance, suggestions, and the ability to generate and transform code.
Python provides a common language through which the human can work with computational tools.
This combination can be extremely powerful.
From consuming AI to collaborating with AI
There is a significant difference between asking AI for an answer and collaborating with AI on a problem.
Imagine two researchers.
The first says:
“Here is my dataset. Analyse it and tell me what you find.”
The second says:
“Here is the research question, the structure of my dataset, the assumptions I want to make, and the analysis I think is appropriate. Help me implement it in Python, explain each step, and suggest ways I can validate the result.”
The second researcher is using AI very differently.
They are not outsourcing their thinking.
They are amplifying their thinking.
And basic Python knowledge makes that collaboration much easier.
This is why PyMedLab teaches Python
PyMedLab is not designed to turn medical and scientific professionals into software engineers.
It is designed to help them become computationally confident.
That means learning enough Python to work with data, understand algorithms, automate repetitive tasks, explore scientific questions, and communicate with computational tools.
And increasingly, it means learning Python alongside AI.
You might ask AI to write a function.
You might ask it to explain unfamiliar code.
You might ask it to find an error.
You might ask it to suggest a more efficient approach.
You might ask it to create a visualization.
You might ask it to help you process a dataset.
But you should still be able to look at the result and ask:
Does this make sense?
That question is at the heart of computational literacy.
You don’t need to know everything
This is perhaps the most encouraging part.
You don’t need to memorise every Python function.
You don’t need to know every library.
You don’t need to write hundreds of lines of code from memory.
And you certainly don’t need to compete with AI in typing code.
Instead, aim for something more practical.
Learn to understand:
Variables — how information is represented.
Data structures — how information is organised.
Conditions and loops — how programs make decisions and repeat tasks.
Functions — how computational tasks are organised.
Libraries — how Python can be extended for scientific work.
Errors — how to recognise and investigate problems.
Data analysis — how Python can help you explore and understand data.
Visualisation — how to turn numbers into meaningful information.
AI-assisted programming — how to ask AI for help while retaining control over the process.
This is enough to open a remarkably large computational world.
The real skill is knowing when to trust the answer
In an AI-assisted world, expertise may increasingly be less about producing an answer and more about evaluating an answer.
That is already familiar in medicine.
A medical professional does not blindly accept every laboratory result.
A scientist does not accept every experimental measurement without considering how it was obtained.
A medical physicist does not accept a calculation simply because a computer produced a number.
The same principle applies to AI-generated code.
AI can produce an answer.
You must decide whether the answer deserves to be trusted.
Python helps you develop the ability to look underneath the answer.
You can inspect the data.
You can examine the calculations.
You can test the code.
You can reproduce the result.
You can change an assumption and see what happens.
You can build your own understanding rather than relying entirely on a black box.
The goal is not to replace AI
There is no reason to learn Python in order to avoid using AI.
Quite the opposite.
Learn Python so that you can use AI better.
Let AI help you write code.
Let it explain unfamiliar concepts.
Let it suggest approaches.
Let it help you debug.
Let it automate tedious tasks.
Let it accelerate your work.
But keep your scientific judgement.
Keep your curiosity.
Keep your ability to question the result.
And learn enough Python to understand what is happening between the question you ask and the answer you receive.
A new kind of scientific literacy
Medicine and science are becoming increasingly computational.
Medical images are digital.
Experiments generate enormous datasets.
Clinical research increasingly depends on data analysis.
Artificial intelligence is becoming part of scientific workflows.
Automation is transforming laboratories and clinical environments.
In this world, computational literacy is becoming another component of professional literacy — alongside mathematics, statistics, scientific reasoning, and domain expertise.
You don’t have to become a programmer.
But understanding programming can give you something extremely valuable:
the ability to work confidently with computational tools rather than simply depend on them.
And that is why learning Python still matters.
Perhaps more than ever.
PyMedLab: Learn Python. Understand AI. Work with your data.
The purpose of PyMedLab is simple:
to give medical and scientific professionals enough computational understanding to work effectively in an AI-assisted world.
Not to turn everyone into software engineers.
Not to make you memorise programming syntax.
But to give you the confidence to look at a piece of code — whether written by you, a colleague, or an AI — and understand what it is doing.
Because the future of scientific computing does not belong to people who can write the most code.
It belongs to people who can ask good questions, understand the tools, evaluate the answers, and use technology intelligently.
Python is one of those tools.
AI is another.
Learning how to use them together is the real skill.

Leave a Reply