I'm an undergraduate who is taking a more rigorous probability class next year, and I'm interested in learning some measure theory to prepare. My most relevant experience is taking a semester of real analysis (in multiple variables). Although my primary motivation is probability theory, I'd eventually also like to learn functional analysis. I like books that provide some intuition and motivation for the results, as well as having good exercises. For example, one book that I particularly like is Abbott's Understanding Analysis. Some books that others have recommended to me are Stein-Shakarchi's Real Analysis, Tao's An Introduction to Measure Theory, and Axler's Measure, Integration & Real Analysis.
Do you have recommendations for books based on the above considerations? I can provide more details if needed.
I leave you a list of books on measure theory:
Remarks: Folland's book is very good, it has good problems. It is a course in measure theory in depth. Ash's book is probability oriented, it is also somewhat dense to read but still quite good. Sheldon Axler's book to my taste is the most didactic and is very pleasant to read, it was published and the digital version is free on the Springer page, and I think it is the most recommended to start.
Edit: Axler's book also begins to see topics of functional analysis