(no subject)

Paul Rubin http
Sat Oct 2 22:35:43 CEST 2004


"Campbell Kwok" <forsberg5 at hotmail.com> writes:
> Hi, I am trying to write a program for my school homework and I'm a
> little stuck. The homework have to do with barcodes and I need to read
> the barcode, then add up all the odd number positions(eg a barcode of
> 123456789012, then the odd is 1,3,5,7,9,1) I do not know how to get
> the odd number positions out of that str of numbers. Please help me

If x is a string, then x[0] is the first character, x[1] is the second
character, and so forth.



More information about the Python-list mailing list