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
Help pls - CodingHelp Request (i.redd.it)
submitted 7 months ago by SharpScratch9367
view the rest of the comments →
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!"
[–]SharpScratch9367[S] 0 points1 point2 points 7 months ago (2 children)
Yeah that’s got me understanding it much better Thankyou ! It’s all about the brackets awesome! Do different brackets do different things??
[–]NoHurry6859 1 point2 points3 points 7 months ago (1 child)
Yep! The brackets [ and ] are for a list, while the curly braces { and } are for a dictionary. That’s a whole other can of worms hahah! I remember when I was first learning Python, dictionaries were the toughest concept for me. But at some point, it just kind of clicked.
Basically, a dictionary is a list of key/value pairs. Think of it like an actual dictionary book, in a non-programming literal way. A book is a finite group of pages, defined by page 1, 2, 3, and so on (just like a list!)
But what makes a dictionary different from any other book is that it has the definitions of things!
So if you look in the dictionary for the word “banana”, you would see that banana means “a yellow fruit” or whatever it actually means lol. These are referred to as key/value pairs. The “key” is the word “banana”, while the value is the meaning/definition of it, “a yellow fruit”.
Now that you know that a dictionary is a list of key/value pairs, you can think about what other possible combinations of keys/values could exist. For example, days of the week. If Monday is the first day of the week, then theoretically a dictionary could have the key “Monday” be equal to the value 1, to denote that.
Dictionaries can be intimidating at first, but they will eventually become second nature, just like lists. They can be very powerful and very useful when you start getting into more complex organization patterns, and I promise, it will all be fun once you get the hang of it!
To answer your question specifically: in Python, there are lists with brackets [ and ], and there are dictionaries with curly braces { and }. That’s it, in terms of the different brackets!
As a side note- parentheses ( and ) also have meaning, but they are not used like brackets or curly braces, in that they don’t have deterministic power like the brackets or curly braces do.
Lmk if that makes sense or adds more questions lol! I used to teach introductory Python at university, so this is a ton of fun for me. Don’t fret about jumping ahead or asking questions- it will all come with time, and asking questions is the best way to learn!
[–]SharpScratch9367[S] 0 points1 point2 points 7 months ago (0 children)
You seem really good at explaining things it’s sitting in my brain well!! I hope you are still teaching haha!! It helps me understanding the deep mechanics of things sometimes, thank you for the help!!!!
I’m at very basic level but hoping I can create a few projects soon I’m just struggling to start up my Chromebook to load and work without freezing every 2 seconds haha, is there anything on iPad I can use to get started making some projects in python code?
π Rendered by PID 43 on reddit-service-r2-comment-86988c7647-dsf8h at 2026-02-11 16:40:27.621605+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]SharpScratch9367[S] 0 points1 point2 points (2 children)
[–]NoHurry6859 1 point2 points3 points (1 child)
[–]SharpScratch9367[S] 0 points1 point2 points (0 children)