0
whats difference python def and class
2 Respostas
+ 7
Def defines functions. Which you can think of as like pushing a button. Whether that's printing something, editing data, generating things, etc..
Class is has more to do with data related to objects. Like enemies in a video game. It can be a monster with a health of 3 and mommy issues. Err...
+ 3
def its used for define functions while class for define classes