1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
new L: list<str>() L->push_tail( "dear" ) L->push_tail( "friend" ) L->push_tail( "---" ) L->push_head( "my" ) L->push_head( "hello" ) L->push_head( "..." ) L->pop_tail() L->pop_head() for S: str in rev_list_iter(L) { print "[S] } ##### EXP ##### friend dear my hello