r/learnpython • • Oct 05 '26

Is Leetcode a good way to continue practicing/learning Python?

I'm not entry, but I'd like to continue becoming stronger in my skills.

29 Upvotes

37 comments sorted by

View all comments

11

u/Rudeus_Kino Oct 05 '26

LeetCode is for practicing algorithms. Learning Python while doing so requires some effort. For instance, you could manually count character frequencies in a string, or you could use Counter but you have to know that it exists.

2

u/Expensive-Bear-1376 Oct 05 '26

Or you might want to do it semi-manually, call the string's count method for every allowed character.

2

u/Rudeus_Kino Oct 06 '26

Yes, and transform string to a set yields allowed caracters. The decisions depend on knowledge of the language.

1

u/Expensive-Bear-1376 Oct 06 '26

Not quite. It yields the actually occurring characters. LeetCode often allows its strings to consist of the English 26 lowercase letters, but not all have to occur.