In water, the shark's streamlined body and powerful tail would give it the speed and maneuverability to outpace and outmaneuver the anaconda. Sharks also have sharp teeth and powerful jaws that are designed for tearing and biting, which would be highly effective against the anaconda's scales.
If the fight were to happen on land, however, the anaconda might have a better chance. Anacondas are extremely powerful constrictors, and they can wrap around their prey and squeeze until it suffocates. Sharks are not adapted to moving on land, and they would be much slower and less agile.
Ultimately, the winner of a fight between a shark and anaconda would depend on the location of the fight and the size and strength of the individual animals involved.