This is the code that I have:
positionMatrix = ([0]*1000, [0]*1000, [0]*1000)
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.
It is still not really clear what you want.
If you want multidimensional array you can use lists:
Also I would recommend the use of
Nonerather that0.You can acces the matrix like this:
Is this what you were aiming for?
For a better visual representation you could do something like:
You could also go with:
Read about it here.
Since you are using python 3x. you should use
range(). Se more here.Oh and by the way there is nothing particularly wrong with what you are doing, you are using a tuple instead of a list, these are not mutable, but the nested lists inside are, so you can modify it:
Just don’t do this:
It refers to the same object in memory.
Just in case, you can use this:
Since you would be creating 3 different objects.