Jm345
For what it's worth, my advice would be to wait until you've settled in your new career and then look at possibly buying a house.
There are various reasons for this being a good idea. Some very good ones have already been mentioned, but what I would add is that there are real advantages when you are in a new job, especially if you have relocated, to being able to live where you work.
You would be surprised how much hassle buying and just running a house can be; when you are in a new job and especially a job like your new one, you don't need extra hassle, you want it to be as smooth as you can make it. If someone else is taking care of your accommodation, that leaves you free to concentrate on your course. Give yourself the best start to your career by putting all your focus on the job.
Something else to bear in mind is that this is a stage in your life when you will be making all sorts of new friendships, some of which will last for the rest of your life. It will be much easier to make friends with the other people in your group if you are all sharing the same accommodation. You don't want to be the one person who goes home.
Team building is an important part of your new career and I think that you would find being part of your team much easier if you chose the live-in option.
PS If you want to, you can always use this particular phase to save a bit in a good savings account, so that, when you are ready to buy, you have the money you will need for a deposit, furniture etc.