Arrays arent the only show in town when it comes to data

Programming languages come with other data-arranging goodies too, and our chosen tool, Python, is no exception. In this chapter, you'll associate values with names using a data structure commonly called the hash (better known as dictionary to Python-folk). And when it comes to working with stored data, you'll read data from an external database system as well as from regular text-based files. All the world's awash with data, so turn the page and start applying your ever-expanding programming skills to some cool data-processing tasks.

Who won the surfing contest? Associate the name with the score Associate a key with a value using a hash Iterate hash data with for The data isn't sorted When data gets complex Return a data structure from a function Here's your new board! Meanwhile, down at the studio...

The code remains the same; it's the function that changes TVN's data is on the money! - ^ Your Programming Toolbox

146 150

154 158 160 164 168

modular programming Keeping things straight

Was this article helpful?

0 0

Post a comment