A quick recap:
We’re cracking on well here, going through the Python course on Coursera as taught by Dr. Chuck (see footnotes for more info and links). We’ve looked a strings and how we can slice, dice and extract data from them using find and split functions. We’ve gone on to learn about files, and proceeded to open and read data from files, both as strings and as lists. We’ve been able to index lists using integer values from zero upwards. Then we’ve gone on to look at dictionaries, which are mini two-field databases of key/value pairs referenced using their keys. And all throughout we’ve been learning about and using various kinds of loops or iterations, conditional statements, and functions (both built-in and defined in-program).
And now for something completely different:
All these things were familiar to me from programming in school and as a maths undergrad (albeit a little rusty!). But now we come on to something completely different, something I hadn’t heard of before: tuples. I’ll call tuples the big brother of lists as they’re very similar to lists: they’re basically another type of collection of things. [Read more…] about Coding 101 (part 8)