Take a set of circular knitting needles. Cast on like 100 stitches. Knit in the round until the piece is like 18" long.
Next row, do K2, YO, K2 together around - always compensate for the extra stitch created by the YO by knitting 2 together.
Knit for another inch or so. Bind off.
Fold in half lengthwise, sew the cast-on edges together.
Thread a strand of i-cord or a length of rope through the holes created by the YO's, making sure that the loop hangs out at one side of your bag. Repeat, making sure the second loop hangs out of the opposite side of your bag.
To close your bag, simply pull on the 2 loops on either side of your bag.
For variety, you can change colors and knit several rounds in whatever color yarn you have handy - just make sure it's the same weight as your original yarn.