Displaying multiple results in a list
Chris Barker
chrishbarker at attbi.com
Mon Dec 3 18:39:57 EST 2001
Russell Briggs wrote:
> Wanted to know if there was a way to specify ranges in a list such as:
>
> newlist = ["1", "2", "3", "4", "5", "6"]
>
> print newlist[1..3] #ie: print newlist[1], newlist[2], newlist[3]
This, and many other nifty things are possible with Python. Please read:
http://www.python.org/doc/current/tut/tut.html
and
http://www.python.org/doc/Newbies.html
you will find the answer to this and MANY other questions!
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list