First I initialized a matrix using list of list with one in every element I tried changing this first element in the matrix by assigning it to 2  chessboard=[[1]*8]*8 chessboard[0][0] = 2 for r in chessboard:   print(r)   The output what i get  [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1] [2, 1, 1, 1, 1, 1, 1, 1]   what I actually expect is   [2, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1] [1, 1, 1, 1, 1, 1, 1, 1]   Can anyone help please
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?
How to use a decimal range() step value? Purpose of @ Symbol Before Strings? Difference between processing.runalg() and general.runalg() In the discussion from a question I asked several days ago (), someone suggested that I use general.runalg() instead of processing.runalg() for running QGIS algorithms.    I've now used both, and haven't noticed a difference in either performance or syntax between them.  I'm just wondering what sort of differences there are between these two methods, and which one I should be using. Why is $\omega$ the smallest $\infty$? Why is using "for...in" for array iteration a bad idea? I've been told not to use for...in with arrays in JavaScript. Why not? How does polynomial long division work? "He was neither seer nor prophet" How would you explain the absence of an article? Here's a fragment from Jack London's Star Rover:     Wordsworth knew. He was neither seer nor prophet, but just ordinary man like you or any man. What he knew you know, any man knows. But he most aptly stated it in his passage that begins "Not in utter nakedness, not in entire forgetfulness.   To the best of my — admittedly sketchy — knowledge of grammar, the second sentence should read neither a seer nor (a) prophet, but just an ordinary man. Even if we accept the seer and the prophet as "poetic entities" ("father and son," "robber and robbed," "man to man," or whatever), logic would still dictate that ordinary man should be preceded by an an.  It is a well-known fact that Jack London's usage wasn't always up to par; his grammar, on the other hand, was always top-notch.  Logically, the sentence is grammatically incorrect (correct me if I'm wrong: no pun intended).  Illogically, it reads smoothly: intuitively, a native speaker understands that there's nothing wrong here.  However, those to whom English is not the first language cannot be expected to be intuitive in this case and would want an explanation. Any suggestions? How do I completely remove Ubuntu? I am attempting to write a filter using something like sed or awk to do the following:   If a given pattern does not exist in the input, copy the entire input to the output If the pattern exists in the input, copy only the lines after the first occurrence to the output   This happens to be for a "git clean" filter, but that's probably not important. The important aspect is this needs to be implemented as a filter, because the input is provided on stdin.  I know how to use sed to delete lines up to a pattern, eg. 1,/pattern/d but that deletes the entire input if /pattern/ is not matched anywhere.  I can imagine writing a whole shell script that creates a temporary file, does a grep -q or something, and then decides how to process the input. I'd prefer to do this without messing around creating a temporary file, if possible. This needs to be efficient because git might call it frequently. My actual WhatsApp back total size is 474Mb but when I go to I cloud back up it is showing 10GB, how is it possible? I mean I have deleted all media files from my WhatsApp and in WhatsApp application the total space is 474MB and also in iCloud storage it is 474MB, but when I entered further in to Backups and then choose my phone, it shows total backup size is 14GB and WhatsApp itself is taking 10GB. Can someone help with this? Use Yaml for MongoMapper Config Trouble with proving $A$ is an integrally closed domain $\Rightarrow$ $A[t]$ is integrally closed domain Can I delete user directory after deleting user? The reason I ask is because I recently made the mistake of installing Oracle 12c on my sub-performance laptop. Noticing the excessive amount of resources this added up to on startup, I decided to uninstall it.  What I failed to see through, however, was the fact that it created a new Windows user account in order for the initial installation to work out. In my case, it was mandatory because I only had an administrator account and I didn't see the need to use the built-in account. So, after failing to successfully install 12c twice, I wound up creating not just one, but two Windows user accounts. This had to do with something in regards to how Oracle sets up the Oracle Home business and whatnot, but I have no idea what any of that detailed, so I just went ahead and did it.  After uninstalling what I could in regards to Oracle and the database, I decided the next thing to do would be to remove the created users.  Having Windows 10 Home installed, I couldn't use the local users &amp; groups view/tool to delete these from the GUI. SO, I did the next best thing and Googled a solution. In my case, I used the following command:  net user username /DELETE   When I executed the command, the console gave the response of having successfully deleted the account for both accounts specified.  To verify that this had worked, I went to the users directory located in %SYSTEMROOT%/Users/ and came to find that the user directories were still there.  What does this mean and if I should delete them, will anything bad happen?  Can I even delete these directories?  Regards,  --T.R.G Plotting layer given with Longitudes [0 360] to [-180 180]? I have a world map in correct Longitudes from -180° to 180°. Additionally, I have a shapefile of data from South America, which shows at 290° instead of -70°. How can I reproject it using QGIS? If $H \leq G$ and $[G:H]! \leq |G|$ then $G$ is not simple In going through the review tool I often come across poor quality answers to poor quality questions. In particular, I will occasionally see questions that are simply asking for links to products, asking for tools, etc. Here are three examples that I've come across just this morning.        Clearly it's appropriate to go to the question and vote to close it (these are examples of not constructive) if they aren't already closed, but what should be done with the answers?    Should the answer be marked for deletion? Much of the normal reasoning for not providing link only answers is defeated if the question is simply asking for links. I'm tempted to mark them as 'looks good' for that reason, because it's the question that is flawed. Is that correct, or should I evaluate all answers as if they were responding to a quality question? Comment font sizes are inconsistent on Android An issue similar to that described in  and likely to be related.  The comments for a question may vary in size:         Chrome for Android on Nexus 7 running 4.2.2 Jelly Bean. This also occurs on Firefox for Android: I have a folder with some directories and some files (some are hidden, beginning with dot). for d in *; do  echo $d done  will loop through all files and directories, but I want to loop only through directories. How do I do that? Does Thanos's choice make any sense? So we know from Infinity War that Thanos was collecting all the Infinity Stones to basically solve the problems brought about by overpopulation on many planets.  But does it make any sense? He could've just easily increased the resources or changed the area or taken appropriate measure to handle that situation. As far as I know, collecting all the Infinity Stones gives the user limitless power and control over the universe in the MCU.  Is Thanos just a mass murderer or is there something I'm missing? So, I was messing around in the Skyrim console and increased my speed a lot. Now I want to reset my speed but the command player.setav speedmult 100 isn't working. Is there any way to reset this?