I wanted to make a function that rotates a 2-dimentional list in python like so: input: [[0,1,2,3],[0,1,2,3]] output: [[0,0],[1,1],[2,2],[3,3]] I wanted to first create a list with placeholder None values so I could easily put in the values later. I came up with this code: matrix = [[0,1,2,3],[0,1,2,3]]#debugging value, will be an argument of the function.  output = [] row= [] for x in range(len(matrix)):     row.append(None) for x in range(len(matrix[0])):     output.append(row)  So, this creates a nice starting point to now organise the data, but now something weird happens. If I now try to run something like output[0][0] = 5, the output variable suddenly has the following values: [[5, None], [5, None], [5, None], [5, None]], while this line should only affect the first list in the list. Even stranger, now the value of the temporary list row is [5, None]. The line should not affect this variable at all. Am I missing something, or is this a bug in Python? I tried this on Python 3.7.6 on windows and Python 3.8.2 on Linux. Can someone please help me with this?
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 haven't found a similar question on here, though I suspect the question may be rather well-covered.   I want to find a conformal map from the vertical strip $\{z:-1&lt;Re(z)&lt;1\}$ onto the unit disc.  Under the exponential map the region is taken to the annulus with radii $e$ and $e^{-1}$, but I'm not sure how useful this will be.  Can anyone advise on what the conformal map may be?  Thanks. Proving that $G$ is a group if $a*x=b$ and $y*a=b$ have solutions. (Reference : Fraleigh, A first course in abstract algebra)     Prove that a nonempty set $G$, together with an associative binary operation * on $G$ such that $a*x=b$ and $y*a=b$ have solutions in G, $\forall a,b\in G$, is a group.   Because * is an associatie operation, we have to prove that: there exists $e\in G$ such that $e*a=a=a*e$ for any $a\in G$, and that for any $a\in G$ there exists $\alpha \in G$ such that $a*\alpha=e=\alpha *a$.  This is very confusing, first I tried to prove the identity exists. If we consider a=b, then $a*x=a=y*a$, and because of the hypothesis $x,y\in G$ always exists, now we have to show that $x=y$, but I just can't do this with out inverses, so I tried to prove that the inverses exists, however I have no idea how the identity looks like, I'm stuck.  And I tried to get unstuck, so I thought particular cases, first if $G$ had only one element, then what would happend if it had just two elements... but I remembered that we don't know if G is finite or not, and I think this makes things a little bit more complicated.  What can I do? Identify cartoon about a set of fairy/demon twins in a far future where the demon uses propaganda to take over the world I'm looking for a cartoon from the 70's (I believe) which is about a set of twins; one plump "fairy" and a skeletal "demon". The "fairy" has magic powers and ends up living a life of pleasure, while the "demon" flees and turns evil.  When the "demon" finds his new weapon in the ruins of the ancient world (roughly modern day) he plots to enslave the world; the weapon in question is a set of propaganda movies with Adolf Hitler. Solve this integral for free WiFi I saw this today, I checked in Mathematica and the integral comes out to $\pi$, but I have no idea how to solve it.     FREE Wi-Fi: The Wi-Fi password is the first $10$ digits of the answer.   $$\int_{-2}^2\left(x^3\cos\frac x2+\frac12\right)\sqrt{4-x^2}\ dx$$ Fundamental group of $S^2$ with north and south pole identified Consider the quotient space obtained by identifying the north and south pole of $S^2$. I think the fundamental group should be infinite cyclic, but I do not know how to prove this.   If it is infinite cyclic, would this and $S^1$ be an example of two spaces which have isomorphic fundamental groups but are not of the same homotopy type? Getting inverse of a transposition key How to show that the monomials are not a Schauder basis for $C[0,1]$ why the monomials are not a Schauder basis for $C[0,1]$?  $p_n(x)=x^n$ such that $(p_n)$ does not form a Schauder basis for $C[0,1]$  span$\lbrace p_n : n\ge 0\rbrace$ is dense in $C[0,1]$ by Weierstrass approxmation theorem, but I cannot figure out why they are not a Schauder basis.  Could you please explain Comparing and contrasting, p-values, significance levels and type I error I was wondering if anybody could give a concise rundown as to the definitions and uses of p-values, significance level and type I error.  I understand that p-values are defined as "the probability of obtaining a test statistic at least as extreme as the one we actually observed", while a significance level is just an arbitrary cutoff value to gauge if the p-value is significant or not. Type I error is the error of rejected a null hypothesis that was true. However, I am unsure regarding the difference between significance level and the type I error, are they not the same concept?  For example, assume a very simple experiment where I flip a coin 1000 times and count the number of times it lands on 'heads'. My null hypothesis, H0, is that heads = 500 (unbiased coin). I then set my significance level at alpha = 0.05.  I flip the coin 1000 times and then I calculate the p-value, if the p-value is > 0.05 then I fail to reject the null hypothesis and if the p-value is &lt; 0.05 then I reject the null hypothesis.  Now if I did this experiment repeatedly, each time calculating the p-value and either rejecting or failing to reject the null hypothesis and keeping a count of how many I rejected/failed to reject, then I would end up rejecting 5% of null hypotheses which were in actuality true, is that correct? This is the definition of type I error. Therefore, the significance level in Fisher significance testing is essentially the type I error from Neyman-Pearson hypothesis testing if you performed repeated experiments.  Now as for p-values, if I had gotten a p-value of 0.06 from my last experiment and I did multiple experiments and counted all the ones that I got a p-value from 0 to 0.06, then would I also not have a 6% chance of rejecting a true null hypothesis? Which gears combinations shouldn't be used? Is there any general rule or recommendation to avoid usage of certain gears combinations (for 2xN and 3xN gears systems)? Do they differ for mtb and road bikes?  I know that it's recommended not to use biggest front chainring with big chainrings on cassette (and opposite) because parts will wear faster and I will loose a bit of pedaling efficiency, but I'm not sure, if I should avoid 2 or 3, or even more biggest (smallest in opposite case) chainrings on cassette. Compute $ \lim\limits_{n \to \infty }\sin \sin \dots\sin n$ I need your help with evaluating this limit:  $$ \lim_{n \to \infty }\underbrace{\sin \sin \dots\sin}_{\text{$n$ compositions}}\,n,$$  i.e. we apply the $\sin$ function $n$ times.  Thank you. How can I obfuscate (protect) JavaScript? I want to make a JavaScript application that's not open source, and thus I wish to learn how to can obfuscate my JS code? Is this possible? I am considering trying to setup a  system. It seems like this would be pretty straight forward if I had two graphics cards or if I didn't need hardware based OpenGL acceleration. Is it possible to setup a multi seat system with only a single dual-headed graphics card? How to add a Login / Logout link in Main navigation menu? How can I add a Login link to the "Main navigation" menu?  When a user clicks on the link, it should take them to the /user/login page. Once they login, the link should change to say "Logout" instead of "Login".  Is there any way to add such a link? Are there any rules related to the creation of a ?   I am aware of the creation method for the amulet. But I'm asking about creating the actual construct. I am trying to use the  package.  I have the following counters defined (hopefully this is the right way to do it!)  \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary}   This works as I would like (i.e. Theorem 1.1, Corollary 1.2, Lemma 1.3, etc.)  My problem is \cref always returns Theorem 1.2, Theorem 1.3. I   Perhaps this is not right? (In my preamble)  \crefname{thm}{theorem}{theorem's} \crefname{lemma}{lemma}{lemma's} Is there a point of beating Vault of Glass raid on Hard after finishing on Normal? Eclipse: I turned on hidden characters now I can't turn off I've been having problems with a blue-screening Laptop (BCCode 124), and I've been trying to track down whats causing it. (It bluescreened randomly after 5-30 minutes of running in win7). It worked in safe mode. I tried reinstalling Windows, which didn't work, so I tried to install various Linux systems which also didn't work.  The only thing working right now is the parted magic version of the ultimate boot cd.(Its a repair linux distro that runs live from ram)  I had the idea to run a bunch of stability tests to try and isolate the faulty component(s), and I wanted some input on my results.  I did different cpu stresstests for different times. No problem (temerature ~60°C sometimes peaks at 65)  I ran memtest with no errors many times.  I also did a GPU check wich is included in the ultimate boot cd - parted magic distro - no problem.  I also checked the hard drive with different tools included in parted magic - no problem there too.  Every linux system I try to install crashes when I try to install it. (It either freezes with no error (rarely happens) or I get something like this shortly after I tell it to install (tried about 20 different distros): [*] 3 photos in the dropbox  Trying to isntall windows 7 just gives a generic "there was a problem" / "an error has occured" screen with no further information.  The laptop is a Lenovo B570. Here are the detailed system specs (the ram is a 4GB kingston now) [*] the hardinfo file in the dropbox  I have 3 crashdumps from Windows wich I can not open. (visual studio says it cant open old crashdump files) [*] 3 dumps in the dropbox  Can you help me to track down the cause?  Edit: im not allowed to post more than 2 links here so here the dropboxfolder with all the things I mentioned:  [*] Why are my render times 30+ minutes, but other people's are ~3 minutes? I am currently using Sheep It! to render my blend (built on v2.68c) on multiple computers, and I noticed something rather strange. According to the log on-site, the frames rendered from other people's blends were completing in 3 to 4 minutes. This was on an 4 core i5. My main rig (with an 8 core i7) was completing frames in no less than half an hour. How is this possible?  To clarify, these people's frames are very complex, often with very detailed textures. I have 2 objects in my blend. Below are the options I changed for my blend:   Aspect Ratio: 1000px x 1000px Output: PNG Clamp Indirect: 0.98 Render Sampling: 128 Min Light Bounces: 0 Max Light Bounces: 4 Cycles Render   Is there something in there that I should change to make it go faster? I can't really comprehend how it's going to quickly.  EDIT: To answer what @Duarte asked...   System Specs: i7-920, 3GB DDR3, GT 630, Windows 10 I have two circles, extended to form a sort of coin with a star on it. It is not complex at all. I have Firefox and Steam running in the background, but not actively. I've been away from the computer for 8 hours and noticed this behavior. (I am running Blender from Steam.) I made sure when I began rendering that the blend was set for CPU rendering.          And to answer what @pycoder asked, yes, I am using Cycles Render. How to safely upgrade from an older Ubuntu version to a newer one? How can I safely upgrade an Ubuntu installation from one release to another? What should I do before upgrading to ensure it goes smoothly, and is there any clean-up I need to do afterwards?  In particular, do I need to do anything special if I am using packages from PPAs, if I have a graphics card that needs drivers, or if I'm running a custom Linux kernel?  This is a general question , but as example we take Ubuntu 12.04 and Ubuntu 12.10