To practice python, I made a simple class for a tree structure in which each node can have infinite child nodes.
class Tree():
def __init__(self, children
In Python 2 print
is a keyword, so you can't use it as the name of a function or method.
In Python 2.7 (and maybe other versions) you can override the print statement with a print function and than override that function.
To do that you have to add
from __future__ import print_function
as the first line of your file.
In Python 2 print
is a reserved word and cannot be the name of a variable or method or function.