Naar hoofdinhoud
🔒 Voorbeeldmodus. De eerste vijftien Foundations-lessen zijn gratis; deze is Pro. Start een 7-daagse trial om de editor, AI-hints en de rest van het curriculum te ontgrendelen. Kaart vereist, op elk moment opzegbaar in Dashboard.Start 7-daagse trial →
⚡
← Cursussen›Python FoundationsModule 7 · Geavanceerde standaardbibliotheek›

__init__ versus __nieuw__

write150 / 174
+100 XP
Opdracht🌐 shown in EN
📝 **Question:** Define class \`Counter\` with \`__new__\` that prints \`"new"\` and \`__init__\` that prints \`"init"\`. Create one instance.\nExpected:\nnew\ninit 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
✏️ Schrijf hier je code
🐍
Python laden...
Eenmalige download (~1 MB). Daarna direct beschikbaar.
📊 Resultaat
Klik op Uitvoeren om het resultaat te zien...