What does a District Attorney do?

A district attorney is charged with representing the state when there is a crime that needs to be prosecuted. They represent the victim and they gather evidence to convict the defendant. In many counties in the US this is an elected position!