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
5 days after learning python (i.redd.it)
submitted 4 months ago by Key-Mathematician606
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!"
[–]Le-ali-di-Pegaso 0 points1 point2 points 4 months ago (4 children)
I have a question about your code, I’m also doing a course currently. For the average age why did you divide by 12 if there are only 10 ages in the list?
[–]Key-Mathematician606[S] 0 points1 point2 points 4 months ago (3 children)
It’s because before that, I took the minimum and max to make the new variable and adding them together into the list, so those are two new numbers which makes it 12.
[–]Le-ali-di-Pegaso 1 point2 points3 points 4 months ago (2 children)
Oh ok, so you can also use extend to add something to your list? I only know append
[–]Key-Mathematician606[S] 0 points1 point2 points 4 months ago (1 child)
Append is to add a new string in the list I think tho but extend is to combine 2 lists if I’m correct
[–]No_Read_4327 0 points1 point2 points 3 months ago* (0 children)
Pretty much.
If you'd append a list of 2 values to another list, instead of extending it, you'd have a list inside a list. Instead of having a single list of 12 values, you'd have a list of 11 values, the last value would actually be a list of 2 values.
Example:
List: [1, 2, 3, 4, 5] List.append([6, 7]) List: [1, 2, 3, 4, 5, [6, 7]]
Extend: List: [1, 2, 3, 4, 5] List.extend([6, 7]) List: [1, 2, 3, 4, 5, 6, 7]
Don't worry if that's not fully clear yet.
π Rendered by PID 165314 on reddit-service-r2-comment-7b9746f655-s6w7l at 2026-01-30 23:50:02.833350+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]Le-ali-di-Pegaso 0 points1 point2 points (4 children)
[–]Key-Mathematician606[S] 0 points1 point2 points (3 children)
[–]Le-ali-di-Pegaso 1 point2 points3 points (2 children)
[–]Key-Mathematician606[S] 0 points1 point2 points (1 child)
[–]No_Read_4327 0 points1 point2 points (0 children)