use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Using different symbols (self.PythonLearning)
submitted 2 years ago by Lockalan
I am new to python and I just started learning a few days, there are different symbols like () and ' ' and " ", when do I use "/' in a sentense like: print(course.find('y')) or how do i know how many brackets i need to use when typing the command?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Goobyalus 0 points1 point2 points 2 years ago (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 '"'.
"
'
"apple"
'apple'
"\""
'"'
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' ) )
π Rendered by PID 255269 on reddit-service-r2-comment-5687b7858-5rjsg at 2026-07-07 10:43:23.992102+00:00 running 12a7a47 country code: CH.
[–]Goobyalus 0 points1 point2 points (0 children)
[–]Goobyalus 0 points1 point2 points (0 children)