Help me to understand this sentence construction from Duolingo
According to Duolingo, it's translated to "I cleaned my house yesterday". What I don't understand is why it's したんです instead of しました. Also, what is the grammar construction of たんです?
「する」 is the dictionary form of the verb 'to do', used for the non past in short form, 「した」 is the past in short form of this verb.
「します」 and 「しました」 are the polite non past and past tenses of that verb.
「んです」 is used after the short forms to make an explanation about something, in this case it could be you and a friend entering your house, he comments on how clean everything is and you respond with: 「きのう家の掃除をしたんです」
It is also used when asking a question and wanting an explanation with 「んですか」. There are variants depending on politeness, written or spoken forms, etc.