So I know that the following sentence is correct: "Had I known about that, I wouldn't have talked to her."
However is this one correct too? "I wouldn't have talked to her had I known about that."
Edit: I specifically mean using the inverted form in the second part of the sentence. I spoke to my English teacher about this and she insisted that the inversion can only be used at the start of the conditional sentence. That's where my question comes from.