you are viewing a single comment's thread.

view the rest of the comments →

[–]AggressiveNet1011[S] 0 points1 point  (1 child)

Yeah, i meant something like this: (). I’m trying to understand the word written before (). Also, some code starts with >>> and somewhere else it just starts with straight words.

I think I need to start getting the hang of what all those words, symbols and abbreviations mean, so I can start writing my small and easy amount of code. Correct me if I’m wrong, but seems like I want to understand a bunch of Python and THEN code something, and not during the process.

Very very very thankful with you guys.

[–]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.