As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 12 years ago.
Tag: java
`final` keyword equivalent for variables in Python?
I couldn’t find documentation on an equivalent of Java’s final in Python, is there such a thing? I’m creating a snapshot of an object (used for restoration if anything fails); once this backup variable is assigned, it should not be modified — a final-like feature in Python would be nice for this. Answer Having a variable in Java be final
Multidimensional array in Python
I have a little Java problem I want to translate to Python. Therefor I need a multidimensional array. In Java it looks like: Further values will be created bei loops and written into the array. How do I instantiate the array? PS: There is no matrix multiplication involved… Answer You can create it using nested lists: If it has to