Lettuce is wonderfully suited to city gardens for several reasons:
1) City gardens are usually small, and city gardeners have to make the most of their limited space. Lettuce has a small footprint. A 24 inch pot can hold 12-15 heads of lettuce. Really.
2) With a shallow root system, lettuce grows blissfully well in containers; 8 inches of depth will suffice. If all you have is a few pots on a terrace or stoop, lettuce won't know the difference.
3) It's an early (cool weather) crop, so you can re-use the container later in the season for a second, warm weather vegetable. When your lettuce starts to bolt (i.e. it gets leggy, bitter, and sets flower buds), the weather and soil are warm enough for eggplant, tomatoes, or peppers, all of which thrive in high heat. What could be more efficient than using one container to produce two edible crops?
4) No store bought lettuce compares with home grown. When your salad was picked a mere 10 minutes before serving the taste is incomparable: sweet, succulent, and alive.
Lettuces grow best in full sun and moist soil, but if your garden is partly shady, they're still worth trying. The heads may not get to be as large and full as the heads you see at the green market, but with 4 hours of sun you'll still produce some choice edibles.
Try a combination of lettuces: red sails, romaine, green leaf, butterhead, and some arugula for a little bite. And if you enjoy foraging (anyone?) throw in a few garlic mustard leaves, watercress, and some chickweed. You'll never look at a supermarket salad bar again.