I'm working on a python 2.7 sudoku checker and am having trouble with the .get(), as it seems it is only working on the last frame (bottom row of entries), the rest just stores empty strings. there's 8 lines marked as test that should output what is currently on the entries. Here is the code:  from Tkinter import *  def armar(x):         global sudoku         global matriz         for i in range(9):                 for j in range(9):                         if matriz[i][j].get()!="":                            sudoku[i][j]=matriz[i][j].get()                            sudoku[i][j]=int(sudoku[i][j])                         else:                            sudoku[i][j]=0         #test---------------------------------         for fila in sudoku:                 for numero in fila:                         print numero,                 print         for fila in matriz:                 for numero in fila:                         print numero.get(),                 print         #--------------------------------------- matriz = [[0]*9]*9 sudoku = [[0]*9]*9 marco = [0]*9  #-------------Window--------------- ventana = Tk()  #Marcos for i in range(9):         marco[i]=Frame(ventana)         marco[i].pack()  #Cuadricula for i in range(9):         for j in range(9):                 matriz[i][j]=Entry(marco[i], width=3)                 matriz[i][j].pack(side=LEFT)                 matriz[i][j].bind("&lt;Return&gt;", armar)  ventana.mainloop()
I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?
Over the time I've been able to vote for closure on SO, I've gotten into the habit of clicking on the reason itself in order to select the radio button corresponding to it. Since the reasons have changed, there are also now links in the middle of the text, which I also happen to accidentally keep clicking on. More annoyingly, these links don't open in a new tab so I have to click back and redo it. This happens most often with the "FAQ" link in the off-topic dialog, which is right there in the top left corner where I normally click.        Basically, those pieces of text now have two functions. One function of it is selecting the corresponding radio button and the other function is loading a new page. Obviously loading the new page trumps simple selection.  This has become even more painful now with the new off-topic messages, where a large portion of the message is a link:        A simple feature request: can the vote-to-close dialog itself not render the links? Where M is a matrix calculate a formula for M^n Let $$M = \begin{bmatrix} -7 &amp; 8 \\ -8 &amp; -7 \end{bmatrix}.$$ Find formulas for the entries of $M^n$ where $n$ is a positive integer.  (Your formulas should not contain complex numbers.)  Your answer should be in the form of a matrix.  I diagonalized to the form $M = P D P^{-1}$  and $M^n = P D^n P^{-1}$ where $P$ is my matrix of eigenvectors and $D$ is my matrix of eigenvalues.  My final answer after diagonalization was $$M^n = \begin{bmatrix} .5((-7+8i)^n+(-7-8i)^n) &amp; (i/2)(-(-7+8i)^n+(-7-8i)^n) \\ (.5/i)(-(-7+8i)^n+(-7-8i)^n) &amp; .5((-7+8i)^n+(-7-8i)^n) \end{bmatrix}$$  I can't seem to find an answer not in terms of complex numbers.  Can someone show me what I'm missing? Proving a graph has no Hamiltonian cycle Solve the equation $28^x = 19^y+87^z$ in integers I'm training a neural network and the training loss decreases, but the validation loss doesn't, or it decreases much less than what I would expect, based on references or experiments with very similar architectures and data. How can I fix this?    As for question        to which this question is inspired, the question is intentionally left general so that other questions about how to reduce the generalization error of a neural network down to a level which has been proved to be attainable, can be closed as duplicates of this one.  See also dedicated thread on Meta: What is the sum of $$\sum_{n=0}^{\infty}\frac{1}{2^n(n+1)}$$    I've spent an insane amount of time on this problem. I checked on Wolfram and it gives $ln(4)$, which I assume you get from $2\ln(2)$.   I know that the integral of $\frac{1}{n+1}$ is $\ln(n+1)$. What am I missing?  Thank you! How should references in non-Latin script language be treated in English paper? Let's say I want to cite a Russian text in my own paper which is written in English. Should I:   reference it as is, in the original Cyrillic alphabet, although the readers won't be able even to pronounce it? transliterate the authors' names, while keeping the rest as is? transliterate the names and translate the title of the work, journal name, etc. into English? anyone tell how is this effect created which change lips color to orange and little orange on face without brush etc tool how to change the only lips color to orange without brush etc tool and how this is created and little orange on face Prove that $\lim \limits_{n \to \infty} \frac{x^n}{n!} = 0$, $x \in \Bbb R$. I am using a local (company) network which provides some servers which are also available from the outside (through one public static IP and port forwarding). And there are some domains which are pointing to the public IP.  What I want is my domains pointing to the local IPs when being inside the local network. I know I will need a local (internal) DNS server which changes the domains to the IPs. I am able to setup the DHCP server to deliver the DNS to the local clients (so this won't be any problem).  What kind of DNS server software can I use to:   repeat all domains like a DNS would do that but for only my domains use the local values Proof of triangle inequality Do singularities have a "real" as opposed to mathematical or idealized existence? I was thinking of, for example a Schwarzchild metric at r=0, i.e. the gravitational singularity, a point of infinite density. I realise that there are different types of singularities--timelike, spacelike, co-ordinate singularities etc. In a short discussion with Lubos, I was a bit surprised when I assumed they are idealized and I believe he feels they exist. I am not a string theorist, so am not familiar with how singularities are dealt with in it.  In GR, I know the Penrose-Hawking singularity theorems, but I also know that Hawking has introduced his no-boundary, imaginary time model for the Big Bang, eliminating the need for that singularity. Are cosmic strings and other topological defects singularities or approximations of them (if they exist).  In what sense does a singularity exist in our universe? --as a real entity, as a mathematical or asymptotic idealization, as a pathology in equations to be renormalized or otherwise ignored, as not real as in LQG, or as real in Max Tegmark's over-the-top "all mathematical structures are real"? How to rate philosophy essays? I might end up teaching philosophy in Finnish lukio/gymnasium. I will not get an opportunity to practice teaching it - I do get to practice teaching mathematics a fair deal, though. (The situation is somewhat unfortunate.) I have taken subject studies in philosophy at university. They amount to around 60 credits (ECTS).  Suppose I give the students an exam, which asks them to write an essay or two. After that my task is to grade the exams in a fair way and comment them in such a way that the students can learn from the feedback.  -  Suppose the task was to write an essay on the problem of universals - nominalism and realism, say. Let us say 6 points is the perfect score for this task.  I would expect the students to define nominalism and realism (2 points, maybe?) and explain the problem (2 points). Remaining two points for taking some stance and arguing for it - realism is more reasonable because so and so. Partial credits for demonstrating only partial understanding.  -  Am I missing some important aspects of philosophical thinking? Should I emphasize the different parts of an answer in a different way? I suspect my perspective is influenced by fairly extensive mathematics education - is there something particular I should watch out for? Find count of all combination of numbers whose sum is x Record Animation In BGE I am having trouble getting the Record Animation setting to work in the BGE. Is it possible to record animated characters that are controlled using BGE's logic bricks with some script? In my script I change the positions of the characters bones. Can I rename the wp-admin folder? Is it possible to rename the wp-admin folder?  I know I could just rename it, but unless it's supported by the code lots of things would break.  If I use a custom folder name, it will make it slightly more secure, security by obscurity and all that. Why could the dwarves only enter Erebor with the secret passage? Please bear with me as I've never read any of the LOTR books or the Hobbit, only seen the movies so far...  But when the sunlight fades and the dwarves think they've lost their only chance to enter Erebor using the secret passage and the key, they turn around to head home. Why is it that the dwarves would be unable to enter Erebor the way they did years ago, using regular doors to get inside? I'm assuming that's how they entered Erebor years ago? Are there experiments that are banned from being done at the LHC? Is there a way to fake a dual (second) monitor Is there a way to fake a dual monitor for testing.    I have only one monitor and I have to make an application that is suitable for two monitors.  The second monitor screen should appear as a window on my primary monitor. vi shows as vim When I type vi into a terminal it shows the following display:    Note that it says vim not vi, I'm sure I haven't downloaded vim yet and that this is actually vi not vim: for example the arrow keys print ABCD instead of moving.