Summary
In this chapter, we have gone over how to create and use classes in Python. We have seen that they allow for code reuse by defining methods, but these methods can have different outcomes depending on which attributes the particular instance of a class holds.
We have briefly looked at the concept of polymorphism and how easy it is to do using Python's dynamic typing.
Our basic command-line version of the blackjack game has been written and is fully playable. We are now prepared to take this up to the next level in the following chapter by utilizing some new Tkinter widgets.
The choice of interface options has been discussed so that we now know why learning a graphical framework such as Tkinter is a good idea to allow for familiarity ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access