To capture an exception message in Python, you can use a try-except block and the as keyword to assign the exception message to a variable.