Most genetic changes have negligible reversion rates. As most mutations that confer resistance to an adversary condition (e.g., drug treatment) also confer a growth defect in its absence, it is challenging for cells to genetically adapt to transient environmental changes. Here we identify a set of rapidly reversible drug resistance mutations in S. pombe that are caused by Microhomology mediated Tandem Duplication (MTD), and reversion back to the wild-type sequence. Using 10,000x coverage whole-genome sequencing we identify over 6000 subclonal MTDs in single a clonal population, and use machine learning to determine how MTD frequency is encoded in DNA. We find that sequences with the highest predicted MTDs rates tend to generate insertions that maintain the correct reading frame MTD formation has shaped the evolution of coding sequences. Our study reveals a mechanism of reversible genetic variation that is beneficial for adaptation to environmental fluctuations and facilitates evolutionary divergence.