Ian D wrote: > I have this part of code and am unsure as to the effect of the array('c') > part. Is it creating an array and adding 'c' as its first value?
No, the first arg to array.array() is the typecode; data may be passed as the second argument. The typecode "c" creates an array of 8-bit characters as defined by the C compiler. >>> a = array.array("c") >>> len(a) 0 >>> a = array.array("c", "abc") >>> len(a) 3 See <https://docs.python.org/2.7/library/array.html> for more. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor