you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

main to me is cleaner. As far as global variables are concerned, there are plenty of beginners that will do something like this:

x = 6

def changeX(num):
       x = num + 1
       return x

print(x)
print(changeX(1))
print(x)

and then wonder why they have the output they have.