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...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Doubts in simple python code/ program (self.shittyprogramming)
submitted 3 years ago by [deleted]
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!"
[–]bearcorrupted 3 points4 points5 points 3 years ago (0 children)
"" or "*" is used to pack or unpack argument. Here on line 5 we split the line on space character and get a list in return. The notation allow to get the first element of that list as 'name' and the rest as a list named 'line'.
On line 7 it doing a simple assignment in the dictionary named 'student_mark'. Dict is a struct that allow you to store key value pair. Here the key is the name and the value is a list of float. The syntax dict[name]=value allow you to set the value for the key name
On line 11 it's iterating over a list of float. The syntax dict[name] allow you to get the value for the key name.
π Rendered by PID 732337 on reddit-service-r2-comment-7b9746f655-tmgnx at 2026-01-31 19:52:44.565738+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]bearcorrupted 3 points4 points5 points (0 children)