Introduction to Python

Available Dates

Course Location Starting Date
Introduction to Python Online 27 April 2026 View

Python is one of the most common general purpose languages used in bioinformatics. In this course we provide a complete introduction to the core python language with the intent of allowing you to develop small python applications. We cover all of the main concepts in the core language as well as the standard library.

By the end of this course you should be able to develop your own python applications to help with automating or processing data.

Note that this course is not based around the use of python for data analysis - this type of use is focussed on a particular subset of packages and is not covered in this particular course.

Pre-Course Requirements & Suggestions

This course makes no assumption about specific skills or knowledge

Course Content

(click to expand each section)

We start by going through how to install and configure a python interpreter and a development environment to allow you to write and run python code. We talk about different types of python environments and the one we'll be using for the course. We write out first python script and cover basic concepts in the language.
We look at the standard set of python packages which always come alongside the interpreter. We go through functions and methods - the two main ways to access functionality in python - and how to use both of them from packages in the standard library.
We look at the full set of built-in data structures in python covering their different properties and use cases. We go through how to create data structures and modify them after creation.
We look at different types of control structures to allow us to perform actions across complex data structures, and to run code selectively. We talk about block structures and code formatting in python.
We look in more detail at different types of text (called strings in python) manipulation which python can do, from simple concatenation to complex formatting and pattern matching with regular expressions.
We cover file handling and how we can read data from files and write data out to files. This section also introduces concepts around error handling and the use of exceptions.
For more complex programs we go through how you can use your own functions to make your code more readable and maintainable. We also look at functions as a way to share code between scripts. Finally, we cover ways to turn your script into a complete application with a command line interface, documentation and a test suite.
In the final section we look at how you can use python to access exteral data resources via APIs. We cover both simple and more complex API usage via the requests package.