Introduction:
Python is an object-oriented programming language, a programming approach that, as the name would imply, is based on objects and classes. This contrasts with other approaches that have looser connections between pieces of data. This is important to know, as in most OOP languages, everything is an object, and this…