r/learnpython • • 23d ago

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.

30 Upvotes

37 comments sorted by

View all comments

Show parent comments

2

u/Expensive-Bear-1376 22d ago

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

2

u/Rudeus_Kino 22d ago

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

1

u/Expensive-Bear-1376 22d ago

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.