And on another note, I've got SVN working with TextMate.
All this reading has made me realize how badly I need my glasses. I'm soooo glad I'm getting contacts tomorrow. And the "Mapping Lists" feature of Python is voodoo magic. Why does this not exist in C++? (And how did I go for so long without it?
!!!!!!
>>> li = [1, 9, 8, 4]
>>> [elem*2 for elem in li]
[2, 18, 16, 8]
>>> li
[1, 9, 8, 4]
>>> li = [elem*2 for elem in li]
>>> li
[2, 18, 16, 8]
So I've got
li = [elem*2 for elem in li]versus
for(int i=0; i< li.size(); i++) li[i]*=2;
No comments:
Post a Comment