I’m familiar with programming but new to python:
mem = [0] * memloadsize
what does the ‘[0]’ represent?
Is it a built-in array?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
[and]characters, in this context, are used to construct array literals:Multiplying arrays is idiomatic, and generates an array gotten by repeating the elements in the array by the given factor:
Note that
[and]are also used to index into an existing array. In that case,[0]accesses the first element in the array: