Yes you can. The following code creates an empty class named joke.
------------
>>> class joke:
pass
-----------------------
The 'pass' needed but does not perform anything. It is needed for the definition syntactically but does not perform or execute any code.
If you want to test whether you created a class, try this:
-------------------
>>> type(joke)
>>>
---------------------
------------
>>> class joke:
pass
-----------------------
The 'pass' needed but does not perform anything. It is needed for the definition syntactically but does not perform or execute any code.
If you want to test whether you created a class, try this:
-------------------
>>> type(joke)
>>>
---------------------
No comments:
Post a Comment