Why Python does *SLICING* the way it does??
James Stroud
jstroud at mbi.ucla.edu
Wed Apr 20 14:01:27 EDT 2005
I like this, it works for any integer.
>>> str="asdfjkl;"
>>> i=-400
>>> print str[:i]+str[i:]
asdfjkl;
>>> i = 65534214
>>> print str[:i]+str[i:]
asdfjkl;
Please forgive my reassigning str. I am one of those type first think later
programmers.
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
More information about the Python-list
mailing list