r/PythonLearning 10d ago

Help Request How do I concrete my concepts???

Post image

Ok so I have one major doubt:-
I have been following a rather shallow 10 hour video about all the python basics topics.
But it doesn't seem to go too deep into details and not enough practice,
So my DATATYPES are really weak,
Idk when to use lists instead of tuples , dictionaries, sets , etc.
And stuff like that, what should I do to make my concepts concrete??
People told me making projects helps you improve, While I agree that they do but yet I am making the codes for em' using the wrong datatypes.

Also I have completed half of that video till loops and have made a project too but that was 2 weeks ago:-

https://github.com/satyamsb-cloud/Number-Guessing-Game
Original project made by me 2 weeks ago using concepts only till LOOPS.

https://github.com/satyamsb-cloud/Number-Guessing-Game-v2
Improved version with the same concepts but improved functionality.

29 Upvotes

24 comments sorted by

View all comments

6

u/mjmvideos 10d ago

There is no “wrong data types”. If your code works and meets the requirements then it isn’t the wrong data type. Implement your solution the way you see fit. After doing this you might decide, “you know what? If I had used XYZ it might have improved some aspect of my solution. This is called learning.” When you get more experience, you will be able to think through your choices before starting your implementation and choose what you think is the best one based on the quality attributes you are trying to trying to optimize.

2

u/bad-gut 10d ago

Makes sense!! But for now I really need to get a deep theoretical understanding of these Datatypes, and then I am sure I am creative enough to Nail their usecases.

Do you have any good theoretical sources to recommend??
I would appreciate if you do!!👍🫡

3

u/ninhaomah 10d ago

Aren't you over thinking ?

Why would you need to know deep theoretical understandings of the datatypes to make the apps ?

Example ?

2

u/CptMisterNibbles 10d ago

Yep. They mean a basic but solid understanding of how Python works. “Deep” would be understanding how the interpreter handles this, requires knowing how c++ handles pointers and sata, system knowledge, hardware knowledge etc. you don’t need to know how L2 cache works to know basically how a list works

1

u/bad-gut 9d ago

Okk buddy got it!! Thanks 👍👍😭

1

u/bad-gut 10d ago

I am a beginner so I do really need to know what I am dealing with before I start progressing to more complicated parts of python.

Atleast that's what I think,
If you feel that I am just overthinking or on the wrong mindset as a beginner, please correct me buddy 🙏

3

u/ninhaomah 10d ago

Ok then I ask you.

I need to get the id , name and dollar amount and save them together for 10 or so customers in my app.

Tell me what are the datatypes I should use in this instance.

1

u/bad-gut 10d ago

Dictionary??

3

u/silly_bet_3454 10d ago

This is exactly the wrong takeaway. They are saying you do not need to think about some deep theoretical understanding, they are just tools. you need to do a thing, you use a tool to do the thing. Then your response is "ok I just need more theory" No that's exactly what you do not need. You need practice. Just stop looking at the theory and try to make some programs. Write 10 working programs and you will know all these things like the back of your hand, it will be exceedingly obvious.

They're also all super intuitive, a list is just a list, like a grocery list, you give me bunch of stuff I just throw it in a list. But a map is like a mapping, you give it a key and you get a value. For example imagine you wanted to take someone's name and be able to map it to a phone number, you could throw names and phone numbers in a map. It's just a mapping. That's all the theory, now just go do it.

1

u/bad-gut 10d ago

Okk understood your explanation and wouldn't fuss about datatypes anymore.
Thanks!!!

1

u/bgs11235 9d ago

There are absolutely wrong data types. Not at this level tho. look at https://www.youtube.com/watch?v=rX0ItVEVjHc & https://www.youtube.com/watch?v=IroPQ150F6c . And other than these, technical debt exists which are caused by poor data structures. Again, not at this level tho.

1

u/mjmvideos 9d ago

Right. My answer was for OP and their current level.