I create a list of identical dictionaries and I would like to update only the value of one specific key of one of the dictionaries of the list, but I don't get what I expect.  Would you know how to do that?
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?
I remember I saw a apt mirror somewhere containing older distributions but I cannot find it anymore. Does anybody know where to find it? How to create a sub array from another array in Java? What's the 'Frequent' sort function? What is the function of the  sorting option on the Questions tab? tables with lots of columns I have a table that lists various attributes of an individuals personal development plan; objective, time to complete objective, comments etc. The table is editable so the user can directly add comments without having to go to an intermediate form. The problem is that the client wants to add more columns and this is messing up the visual display.   The alternatives I have are:   allowing columns to expand out on click keeping essential attributes in table, rest in 'advanced edit option form' or somesuch I don't know - have you any ideas?   One more thing to add: I think the addition of extra columns is based on user feedback ...  edit: here is what I have gone for Can't open a folder in windows 7 64bit, by double clicking, it shows me that the default option for opening folder is "cmd" (it's highlighted when i'm right clicking a folder, and the "open" option comes next). I've tried running some registry fixing tools, but it didn't fix it. Can someone suggest me what should I do. At the very end of Deathly Hallows, after Harry repaired his own wand with the Elder Wand, he tells Dumbledore's Portrait in the office:     “I’m putting the Elder Wand,” he told Dumbledore, who was watching him with    enormous affection and admiration, “back where it came from. It can stay there. If I die a    natural death like Ignotus, its power will be broken, won’t it? The previous master will    never have been defeated. That’ll be the end of it.   Now, this seems incredibly foolish to me.  "The previous master will never have been defeated" would only have been assuredely true if Harry had died right after depositing the Elder Wand back into Dumbledore's Tomb.   If not, Harry (the Wand owner) would still be alive, and at the risk of being Disarmed (as was shown with Harry and Draco Malfoy, it doesn't matter if the Elder Wand's owner is defeated by death or simple disarming, AND it's not even required that the Disarming would involve the Elder Wand!).  So, if Harry merely put the Elder Wand back into the Tomb, and some years later, someone would disarm him (or, even worse, kill him) - then that someone would become the Elder Wand owner, either by accident or by design:    By accident - Harry is likely to get into plenty of magical duels in the future. Even discounting friendly one (teaching people the Expelliramus), he plans on becoming an Auror!  By design - plenty of people have been in the Great Hall hearing Harry explaining to Voldemort that he, Harry, was now the owner of the Elder Wand, so the fact of his ownership would most assuredly NOT remain a secret, inviting countless people tempted by owning the Deathstick to hunt Harry down. Oh, and the location is now also known!   So "its power will be broken" is quite unlikely to come true!  Is Harry hopelessly wrong? Or am I missing something in the above logic? Was this addressed in canon/JKR info? `time echo` got no output Is the "Roman alphabet" what we use for English? I understand that the alphabet for the English language is not strictly English as languages such as French, Dutch and many more use the same alphabet, with few additions in other languages. Is Roman alphabet the common term to refer to this set of symbols for writing texts? In a triangle $\angle A = 2\angle B$ iff $a^2 = b(b+c)$ Prove that in a triangle $ABC$, $\angle A = \angle 2B$, if and only if:  $$a^2 = b(b+c)$$  where $a, b, c$ are the sides opposite to $A, B, C$ respectively.   I attacked the problem using the Law of Sines, and tried to prove that if $\angle A$ was indeed equal to $2\angle B$ then the above equation would hold true. Then we can prove the converse of this to complete the proof.   From the Law of Sines,   $$a = 2R\sin A = 2R\sin (2B) = 4R\sin B\cos B$$  $$b = 2R\sin B$$  $$c = 2R\sin C = 2R\sin(180 - 3B) = 2R\sin(3B) = 2R(\sin B\cos(2B) + \sin(2B)\cos B)$$  $$=2R(\sin B(1 - 2\sin^2 B) +2\sin B\cos^2 B) = 2R(\sin B -2\sin^3 B + 2\sin B(1 - \sin^2B))$$  $$=\boxed{2R(3\sin B - 4\sin^3 B)}$$  Now,   $$\implies b(b+c) = 2R\sin B[2R\sin B + 2R(3\sin B - 4\sin^3 B)]$$  $$=4R^2\sin^2 B(1 + 3 - 4\sin^2 B)$$  $$=16R^2\sin^2 B\cos^2 B = a^2$$  Now, to prove the converse:  $$c = 2R\sin C = 2R\sin (180 - (A + B)) = 2R\sin(A+B) = 2R\sin A\cos B + 2R\sin B\cos A$$  $$a^2 = b(b+c)$$  $$\implies 4R^2\sin^2 A = 2R\sin B(2R\sin B + 2R\sin A\cos B + 2R\sin B\cos) $$  $$ = 4R^2\sin B(\sin B + \sin A\cos B + \sin B\cos A)$$  I have no idea how to proceed from here. I tried replacing $\sin A$ with $\sqrt{1 - \cos^2 B}$, but that doesn't yield any useful results. How to avoid having my father's down payment assistance get taxed as a gift Securely erasing all data from a hard drive I am about to sell my old desktop PC and I am cautious about some of my sensitive information being available to the purchaser, even after reformatting the hard-drive, using data recovery software.  How can I securely wipe the hard drive so that the data on it cannot be recovered?  Although I specifically want help with my Windows PC, it wouldn't hurt if there were suggestions for Macs as well. Why (...) doesn't spawn a new child process when run in background? How to copy a dictionary and only edit the copy In the comedic music video  there are many clips of vintage scifi films, some of which I recognize.  This one however, of a large blue floating holographic head talking to some kind of military installation does not look at all familiar.  Does anyone recognize this film? Is a general GRE score of X sufficient for entry to postgraduate degree Y? Probability that uniform random variables equal the natural numbers I have random variables $X_{1}, X_{2}, \dots X_{n}$ that are each Unif$\{1, \dots, n\}$, and I want to calculate $$P(\{X_{1}, X_{2}, \dots X_{n}\}=\mathbb{N})$$  My intuition is that this means each $X_{n} = n$, which occurs with probability $\frac{1}{n!}$.  Does this seem correct? What does the exclamation mark do before the function? Find out which process is locking a file or folder in Windows Opening document library files in popup or new window Is there any easy way to open the document library files in a new window or popup depending on the file types?  e.g. PDF - In Adobe reader (currently opens in IE)  Image file (currently opens in IE) The square root of a prime number is irrational If $p$ is a prime number, then $\sqrt{p}$ is irrational.  I know that this question has been asked but I just want to make sure that my method is clear. My method is as follows:  Let us assume that the square root of the prime number $p$ is rational. Hence we can write $\sqrt{p} = \frac{a}{b}$. (In their lowest form.) Then $p = \frac{a^2}{b^2}$, and so $p b^2 = a^2$. Hence $p$ divides $a^2$, so $p$ divides $a$. Substitute $a$ by $pk$. Find out that $p$ divides $b$. Hence this is a contradiction as they should be relatively prime, i.e., gcd$(a,b)=1$.