Not the phrasing I used or would use but, of course.
If your goal is specifically to learn how to work with people you don't like then it makes sense to try work with them. If your goal is anything but that then you're better off avoiding that situation.