Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
LXX

Psalms 17:27

And with the excellent [man] thou wilt be excellent; and with the perverse thou wilt shew frowardness.

Read in other translations