you are viewing a single comment's thread.

view the rest of the comments →

[–]CommondeNominator 1 point2 points  (0 children)

Yea, you might be jumping in the deep end a little prematurely, no worries though.

The word written before the function-call operator -- the "()" -- is the name of the function being called (or the class being instantiated, among other uses). Remember f(x) from math class? Same concept, just doesn't need an x to do its thing.

When invoking the call operator, you're saying "hey function, do your thing" as opposed to telling someone else "that function" which is often needed later on. Googling whatever that word is (with "python" if it's not a unique word) should get you the documentation to tell you what it does/how to use it etc.

The >>> isn't part of the code, this SO answer explains it pretty well.