* The fish is a hermaphrodite: Some fish species can change sex or are naturally hermaphrodites, meaning they have both male and female reproductive organs. This allows them to self-fertilize and produce offspring on their own.
* The fish was previously exposed to another fish: Even if the fish was alone in the tank *now*, it might have been exposed to a male fish previously. This could have led to fertilization, and the fish might have retained the sperm for a while.
* The fish is a livebearer: Livebearers like guppies, mollies, and platys don't lay eggs. They give birth to live young. This means that the fish could have been pregnant before being placed in the tank alone.
It's important to remember that fish, like other animals, have unique biological complexities. While it's a fun and interesting question, it's best to consult a real-life expert like an aquarist or a veterinarian if you want to know more about your fish's behavior and potential for reproduction.