Linux Today: Linux News On Internet Time.

More on LinuxToday

Python4Kids New Tutorial: Random Imports

Jul 27, 2010, 18:03 (0 Talkback[s])
(Other stories by Brendan Scott)


Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers

[ Thanks to Brendan Scott for this link. ]

"In 1970, the British Empire lay in ruins, and foreign nationals frequented the streets – many of them Hungarians…

"Hungarian: Ya! See-gar-ets! Ya! Uh…My hovercraft is full of eels.

"In our last tutorial, we met the concept of functions. It turns out that functions (and another concept called classes, which we haven't got to yet) are the workhorse of Python. Almost everything you will end up doing with Python will involve the use of functions. The good news is that most of what you do will rely on functions written by other people. Python includes a mechanism for sharing functions with other people, but also with yourself – so if you write a function for one program today, you can use it with a different program tomorrow (the multiply() function we wrote earlier might be useful in many different sorts of programs for example). That mechanism is called the import statement."

Complete Story

Related Stories: