r/learnpython • • Mar 01 '21

Python is kicking my butt

I’ve been learning python since early December now.. I seemed to become comfortable with the syntax and was gaining confidence quickly!

Then I moved on to Django and was quickly sent a reality check as the difficulty level increased really fast... I went back to python and started learning classes... this also is extremely hard to grasp..

While learning classes I realized I didn’t know for loops.. dictionaries.. len/range() nearly as much as I thought I did... the confidence I so quickly built is now gone.

I know the journey to web dev isn’t going to be easy at all.. I’m not giving up.. just wanted to get this off my chest.. I’m going back to the basics this week. Wish me luck. Have a nice week!

486 Upvotes

118 comments sorted by

View all comments

Show parent comments

1

u/CyclopsRock Mar 01 '21

it returns the number of values contained in a collection. Easy!

Unpopular opinion time: This is why 1-based indices are better than 0.

1

u/primitive_screwhead Mar 01 '21

Have you used Matlab?

1

u/CyclopsRock Mar 01 '21

Nope!

1

u/primitive_screwhead Mar 01 '21

How about any 1-based-index language? I'm just curious if your opinion is purely hypothetical, or if you've got experiences using both. (I'm biased towards 0-based, but have also used 1-based for Matlab, and other numerics languages and libraries).

1

u/CyclopsRock Mar 01 '21

Oh yeah! My other "main" language is. It's really not a big deal either way but imo having your collection length throw an index error is more confusing than having 0 do so. And in a language where you don't need to worry about addressing memory, it's easier to think about items in a collection as being like a numbered shopping list rather than spaces to be occupied.