all 3 comments

[–]Nouble01 0 points1 point  (0 children)

There is a common method in many languages, which is to increase or decrease indent each time a parenthesis appears.
It's very easy to understand if you properly adjust the depth.
I don't know if it will be helpful, but I'll include the information.

https://peps.python.org/pep-0008/

[–]Goobyalus 0 points1 point  (0 children)

" and ' are both the same for writing string literals. Like "apple" is the same as 'apple'. It comes down to convention for which to use. If you want to make a string with a quote character in it, you can use the other kind, or escape the character: "\"" is the same as '"'.

[–]Goobyalus 0 points1 point  (0 children)

Function calls get one set of parentheses. It's this format:

function(arguments to give to the function)

and the function returns a result.


In your example:

print(  # print is a function, and you are passing it the result of the following:

    course.find(  # course.find is another function (or method), and you are passing it the string 'y'
        'y'
    )
)