What type of snake is this?
Montgomery County Maryland
This looks like a juvenile black rat snake. The juvenile black rat snake is not black. They are very light gray with dark brown almost black rectangular blotches on the back. This snake is harmless and not poisonous. It is good you released it.
Snakes in general are beneficial because they help keep the rodent population down. See our publication on snakes for more information http://extension.umd.edu/hgic/snakes