Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Python4Kids New Tutorial: Random Imports

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

[ 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: