String Problem, What is it I don't understand?
Bubba
bub at joos.us
Thu Jan 16 13:58:29 EST 2003
I would expect to get the month day and year from the following, but
day and year are null
xxx = "01/17/03"
month = xxx[0:2]
print "month=",month
day = xxx[3:2]
print "day=",day
year = xxx[6:2]
print "year=",year
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on
win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>>
month= 01
day=
year=
More information about the Python-list
mailing list