The branching of streamers in high pressure gas discharges and discharges in liquids is an almost universal occurrence having many causes. In this paper, we discuss results of an investigation of one possible cause-inhomogeneities in the media through which the streamer propagates. These inhomogeneities produce corresponding enhancements or decreases in ionization and excitation as the avalanche front encounters them, some of which may produce branching. Three types of inhomogeneities were investigated-negative bubbles (regions having a lower density than ambient), positive bubbles (having a higher density) and solid bubbles (particles). Depending on the size and density of the bubble, the streamer can be focused into the bubble (negative small bubble), deflected and split (positive bubbles and particles) or refracted (large negative bubble). In the case of gaseous bubbles, this behavior is partly explained by the larger E/N (electric field/gas number density) in the negative bubble, producing more ionization by electron avalanche, and smaller E/N in the positive bubble, producing less ionization. A streamer may diverge into a negative bubble located off axis due to seeding of electrons in the bubble by photoionization and subsequent avalanching in the large E/N.