I am using a online console of python: http://shell.appspot.com/
I am trying to write this code:
class tree:
def __init__(self, charge, left=None, right=None):
self.charge = charge
self.left = left
self.right = right
When I wrote the first line class tree: I push enter and I get this error from the console
Traceback (most recent call last):
File "/base/data/home/apps/shell/1.335852500710379686/shell.py", line 221, in get
compiled = compile(statement, '<string>', 'single')
File "<string>", line 2
^
IndentationError: expected an indented block
Does anyone could tell me how to write this piece of code?
Thanks.
Do not use ENTER.
As indicated at the bottom of the online shell page use: