I'm Learning Python part 7
I’m Learning Python (part 7) Apology: First of all I wanna apologize for being late with this part, I’ve had busy days first during Shaam 2008 expo and second during some studies at the college and last busy time past launching Bawabaty project. Numbers: Numbers in Python are divided into 5 sections: Integers: Such as: [...]
I'm Learning Python part 6
I’m Learning Python (part 6) Dictionaries Dictionaries in Python are like dictionaries in life, they consist of key-value pairs, each key maps a value, values can be any object type, and keys also. Keys must be unique, I mean that we can’t have two identical keys with different values. Dictionaries are defined using curly braces [...]
I'm Learning Python (part 5)
I’m Learning Python (part 5) String Is Immutable? Last time I told you to try to change a specified character, you must have failed if you tried: >>> s[0] = ‘c’ The error you’d get is: TypeError: ‘str’ object does not support item assignment This means that strings are immutable, so are core-types, numbers and [...]
I'm Learning Python part 4
I’m Learning Python (part 4) Why Use Built-In Types? Most of the time in programming you’ll use lists, stacks, arrays, queues and dictionaries, so instead of constructing them, Python gives you a bunch of built-in types to use. The built-in types implement the semantic of the type ADT (Abstract Data Type), and they are fast, [...]
I'm Learning Python part 3
I'm Learning Python (part 3) What Is Interactive Mode? When you install Python on your platform you'll find an executable called 'python', when you run it you'll find a terminal and you'll see something like the following: Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" [...]
