- I HATE curly brackets and the option to have them or not. Thats what Python has done for me. I LOVE indentation! Bad Javascript/C/C++ etc.
- string to int:
- int to string:
- dictionary OMG I cant believe the code to sort:
for i in sorted(dict):
is:
var keys = Object.keys(dict);
keys.sort();
for (var i=0; i<keys.length; i++) {
var key = keys[i];
var value = dict[key];
// do something with key and value here...
}
Python has local variables with no declaration but globals need marking as global. This is good because you do not have many global variables ... do you! Of course you have lots of local variable and they all need a var declaration. Hey ho I can get used to this.
I will always use braces even when I don't need them.