It's from Spain
It's from Spain
But with nuances. The russian saying is similar: "С кем поведёшься, от того и наберёшься" (literally: "You learn from the people you take up with").
One way to same the same thing is "a man is known by the company he keeps", but the best english equivalent would be: "You lie with dogs, you wake up with fleas"
We also have
Cría cuervos y te comerán los ojos
In case you want to warn of dangerous acquaintances
https://cvc.cervantes.es/lengua/refranero/ficha.aspx?Par=585....
Though surely the idea goes back to antiquity and someone like Seneca would have something to say about it (but not in English)!
(On the same subject we also have "chi va con lo zoppo impara a zoppicare", which is probably not pc-enough to safely translate these days.)
-- Frank Reynolds
But now someone else mentioned Italy. I wouldn't be surprised if it traces its roots to ancient Rome or Greece.