hi guys
wat if List is equivalent 2 Arrays in c
or do we have Arrays seperately defined in python??
karthik.c 6 Light Poster
Recommended Answers
Jump to Post— scru 909We don't have separately defined arrays. Lists are the closest thing we got, I believe.
There is a library called NumPy that implements C arrays for python. The only limitation ( I think ) is that they must be arrays of numbers.
Jump to Post— Ene Uran 638Oh yes, Python has an array type, but you must import module array:
# module array has Python's array type import array # Python25 use 'c' as the character typecode # Python30 uses unicode character typecode 'u' char_array = array.array('c', 'hello world') print(char_array[0]) # h print(char_array) # …
All 5 Replies
scru 909 Posting Virtuoso Featured Poster
Ene Uran 638 Posting Virtuoso
scru commented: You knowledge of Python is astounding +5
scru 909 Posting Virtuoso Featured Poster
jrcagle 77 Practically a Master Poster
karthik.c 6 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.