Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I would write here reply on your old question, just to make a note on my understanding of join statement work.
Databases are usually working with various data having certain characteristics based on which data could be filtered or sorted.
If you have two independent sets of data you have to allign certain elements from one set with certain elements from another set.
I.e. you do something like: for each element from set 1 find elements in set 2.
In your particular case your request is: For each element in table posts find 2 elements in table categories where id's are equal.
we took first post, take it category and search for it in table categories, obviouisly your limit statement does not make any sence as soon as for each element form posts table always exists only one record in categories ...
I think its pretty readble to me.
Stop writing one line! It is not readable
well, most of times we call some functions without knowing how it's done inside the blackbox, that is abstraction. it is a fact that is not readable but you would not need to read that.
Unreadable. I wish code like this would not get upvoted so much. This is not best practice.
Please stop arguing guys. All those solutions are bad, yours and mine too. We parse twice the array while it would be so easy with only one pass.
@WloHu list comprehension is an important thing to learn for python newbies. And your solution actualy IS shit
lol
This comment is hidden because it contains spoiler information about the solution