Both loop diuretics and thiazides can cause hypokalemia by:
High-Yield Explanation
Diuretics prevent the reabsorption of Na+-more amount of Na+ reaches the distal poion of the nephron i.e. late DT and collecting ducts. Na+ is exchanged with K+ and H+ Increased distal delivery of Na+ results in more exchange and thus hypokalemia