Advice to all Python users: learn JavaScript
neither does python :P
example: def func():print('helloworld')
def func():print('helloworld')
Also, indents have to be 4 spaces, can't be 2
they can be anything as long as they are consistent
I'm not sure what you're using but it isn't standard python
Python doesn't mind whether you use two spaces or four spaces (or any other number of spaces) as long as you are consistent. For example if you start off using four spaces for an indent, then you should always use four spaces.
What version is this?
PEP 8 guidelines say otherwise
https://tio.run/##bZA9C8JADIZn/RWhiwri4ubi7KA4CM5pG2lQc8clfv7581pLrdBMGZ73yYd/WeVkGSOf4BButBpDKh9YbJptpCQxBRbYNxxgIJkYoIJa4KLp2ECJrrrIZk34z9RzFU6U1ZIRlN@k65bvkJ1LncsvdB1UjVpsy08wzBVQSlCPxU/VIXimeq8KvScZtvUGDxghHcvf8zt5L3Gs0OhOYQ4PgtLVPynSb9KkGD8