Цитата:
site1 aboutsite1 type1
site1 aboutsite1 type2
site1 aboutsite1 type3
site2 aboutsite2 type1
site2 aboutsite2 type2
site2 aboutsite2 type3
site3 aboutsite3 type1
site3 aboutsite3 type2
site3 aboutsite3 type3
а мне надо:
site1 aboutsite1 type1
_____________ type2
_____________ type3
site2 aboutsite2 type1
_____________ type2
_____________ type3
site3 aboutsite3 type1
_____________ type2
_____________ type3
|
Я честно говоря не понимаю большой разницы.
Просто записывай site1 в переменную и итерируй: пока эта переменная равна site1, то и все type-ы принадлежат этому site1. Тоже самое для других site-ов