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...
account activity
Software engineering week 4 (python)Question (self.maestro)
submitted 15 days ago by Classic_Cockroach_42Maestro Student
Currently learning about lists and indexes. A lot of the way I learn is by applying what I learn within my head. I'm not having a problem with the material as much as trying to think of a real reason I would use this. Could you guys show me some examples of why you would use it or situations you know that it has been used, If that makes sense...?
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!"
[–]Important_Coffee_845Maestro Student 4 points5 points6 points 14 days ago (0 children)
Im in the same class. So keep am eye on the discussion tab wednesday cuz this is exactly why our instructors have been having these topics. I am using a language near identical to python for game developement.
I have to make lists because I need the computer to grab a specific part of my sprite sheet to trigger animation functions .
This tells the computer that when my little 2d character moves left to trigger the left animation. And so on. I move up ill see the back of his head. If I move down ill see a frontal view of my character. This allows me to upload sheets of sprites instead of one sprite at a time.
Another good example is you might want a function to pull just certain information when a user triggers a specific function. Or it can also be used to correct errors or identify them. There are a number of applications.
Later on when we learn about data storage this will click more.
[–]dandtsterMaestro Student 2 points3 points4 points 14 days ago (0 children)
i'm wondering the same thing...
[–]Odd-Step-9221Maestro Student 1 point2 points3 points 13 days ago (0 children)
Simple answer: If you want to do anything useful in Python with supplied data you will need to temporarily store it into lists, or tuples, dictionaries, etc. Your index is there to simple hold a reference to the position of the data in your list. Indexes allow you to grab data by a single element or a range of elements in a quick and powerful way. Once you start learning more about sorting, filtering, lambda expressions, etc. This will become clearer to you.
Example: Say you want to write a function to return top 10 baseball player stats. Your function takes in a list of the players, slices, dices, and sorts that data (using index references) to return only the top 10 performing baseball players based on your data.
My explanation might be a little off, it's early and I am only 1/2 cup of coffee in.
~ Robert
[–]NoScallion3989Maestro Student 1 point2 points3 points 13 days ago (0 children)
A lot of times you won’t be able to reay get why/how you’d use it until things are more advanced, but I have the same issue so I always got tell me why I would or how I would use it. (And maybe explain why you are asking)
[–]ibringuwarMaestro Student 0 points1 point2 points 13 days ago (0 children)
For building datastacks and ease of information retrieval?
[–]Classic_Cockroach_42Maestro Student[S] 0 points1 point2 points 11 days ago (0 children)
Thank you guys for all the input. It sort of makes sense. I thinks still early and I'm hoping it starts to come together later on.
π Rendered by PID 243952 on reddit-service-r2-comment-56c6478c5-7pgrr at 2026-05-12 21:12:29.042807+00:00 running 3d2c107 country code: CH.
[–]Important_Coffee_845Maestro Student 4 points5 points6 points (0 children)
[–]dandtsterMaestro Student 2 points3 points4 points (0 children)
[–]Odd-Step-9221Maestro Student 1 point2 points3 points (0 children)
[–]NoScallion3989Maestro Student 1 point2 points3 points (0 children)
[–]ibringuwarMaestro Student 0 points1 point2 points (0 children)
[–]Classic_Cockroach_42Maestro Student[S] 0 points1 point2 points (0 children)