Abstract
In Python everything is an object and as such is an example of a type or class of things. For example, integers are an example of the int class, real numbers are examples of the float class, etc. In this chapter we will look at what a class is in Python, how it is defined, how instances of a class can be created, how attributes (data) and methods (behaviour) can be defined for a class and outline how memory is managed within Python with respect to instance creation and deletion.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2023 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Hunt, J. (2023). Python Classes. In: A Beginners Guide to Python 3 Programming. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-031-35122-8_19
Download citation
DOI: https://doi.org/10.1007/978-3-031-35122-8_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-35121-1
Online ISBN: 978-3-031-35122-8
eBook Packages: Computer ScienceComputer Science (R0)