String Problem, What is it I don't understand?

Bubba bub at
Thu Jan 16 19:58:29 CET 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
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
month= 01

More information about the Python-list mailing list