I'll start posting some more interesting things once I learn all these basics. For now, I'm just posting what I learned when I read through another part of a tutorial. [grin]
I learned ML earlier this semester for the same class. ML has some cool pattern matching techniques. While it's not exactly pattern matching, it goes along with it. ML expanded lists so that you could assign separate variables values all at once, like:
(a,b,c) = (1,2,3);
Python takes on this ability, which I think it pretty cool.
>>> a, b, c = 1, 2, 'c'
I've been playing around with the built-in function "print". It's a pretty useful function as you can do the "printf" type formatting, but not having to worry about type-safety. It's also has a weird thing about adding new-lines: it automatically adds a new-line unless you put a comma after the print statement. It also automatically adds a space after printing something, and though it's cool, I couldn't find a way for it not to do that which might be annoying.
>>> i = 1000;
>>> print "The value is", i
The value is 1000
>>> i = 0
>>> while i<10
i = i + 1
0 1 2 3 4 5 6 7 8 9
I'm a little confused about functions though. You can do print("Hello") and it seems to do the same as print "Hello". You can't do print("Hello", i) though, so I'm not exactly sure what "print" is. I guess I'll figure that out when I learn more about functions.
I think I've covered a lot of the basic syntax of Python. I'm sure there are some other weird syntactual quirks or cool things about Python, but I'm going to leave them be and journal about more serious stuff from now on. I'm gotten comfortable enough to program basic stuff in Python. I'm also not going to journal about every library. I'll probably focus on functions and other major parts of the language.