A chatbot can be created in Python using Machine Learning by following a couple of simple steps. To begin with, import and load data files and the dictionary necessary. Second, work on preprocessing the data with operations such as tokenization to break whole texts into smaller bits. Third, assess the inputs and the outputs to create the training and the testing data. Model building follows this, and the Keras sequential API can be used to train the model easily. After model building comes prediction. The trained model needs to be loaded, and classes have to be predicted to see if the right responses can be extracted from the model. A GUI can always be implemented to make it look nicer, and Tkinter is a nice package in Python that helps you with just this. All in all, it is pretty easy to create a functional chatbot using Python and Machine Learning.
If you are looking for an online course to learn Machine Learning, I recommend this Machine Learning Certification program by Intellipaat.