Answer:
If you're an introvert, you can say that you generally enjoy working alone, but explain that you can also work well with others, too. For example, “I really enjoy collaborating with a team and brainstorming ideas, but that doesn't mean I can't work independently to get things done.
Acknowledging working as a team and independently shows you are a well-rounded individual who likes all work environments. However, employers won't accept you directly answering “both”, so you need to pick one depending on the type of role you're going for – but remember to address the other side too.