I wonder why append add a number to every list that I have in my list. Not only to that one ([0]) that I have choosen. What's the difference between writing [0] or any other number next to append?  j = [[]] * 5  j[0].append(5) # add 5 to every list on list j[1].append(4) # what's the diffrence? [1] or [0]; it adds number to every element anyway print (j) j.append(0) # add 0 to the main list print (j)
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?
Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory Where are the default settings saved for the Command prompt defaults? $\chi(G)+\chi(G')\leq n+1$ How to prove, that the sum of chromatic numbers of graph and it's complement is smaller then the number of vertices incremented by one?  $\chi(G)+\chi(G')\leq n+1$  The notes from my classes say to color the first graph using sequential algorithm with vertices ordered by their degrees (the ones with lowest appear first). We would get $k_1$ colors, then we color the graph $G'$ in the backwards order and get $k_2$ colors, and the sum $k_1+k_2$ in my notes is magically smaller than $n+1$, but I just don't see why... I'm used to always hearing or seeing a  before certain nouns.  Yet on certain occasions the article is totally omitted, and it bothers me.  I'm wondering what the justification for omitting the article is, especially when the definite article would seem to be required, or if it is just bad English either on the part of the individual in question or more likely by tradition.  The most frequent place I hear this is at the doctor or dentist's office. In every one I have ever visited, the receptionist or assistant always says things like "Doctor will see you shortly" instead of "The doctor will see you shortly."  The wikipedia article linked above says this: "A definite article indicates that its noun is a particular one (or ones) identifiable to the listener".  In the case of a clinical setting, I know who the doctor is, especially if this is not my first visit.  The people in the office know the doctor even better than I, so it would seem to be inappropriate to omit the article. Even the indefinite article would be incorrect. It further says, under "Zero article":  "In languages having a definite article, the lack of an article specifically indicates that the noun is indefinite."  Since the noun is not indefinite, why are they omitting the article?  Another place I see the article omitted is with the word "bar".  Bartenders apparently don't say "I tend the bar" they say "I tend bar".  Unless a bartender works in multiple bars, it would seem like an article would be required.  Furthermore, "the bar" can mean any bar a person goes to, so even in a case like , it seems like the word "the" should be in the sentence.  The only thing I can think of in this case is maybe the speaker doesn't want to confuse the listener into thinking they work in the legal field.  Is this just a bad habit, a historical corruption or tradition, or is there really a valid reason (or perhaps more than one) for these omissions? I'm trying to hide the app icon from the title bar in GNOME in Ubuntu 18.04. I know there is  asking the same thing but it's from 2011 and I can't find what it requires to find in the shell css. I'm also using the Arc-Dark custom theme.   Here are two examples of what I want to remove:      To be clear, I don't want to resize it to fit, I want to straight away remove it completely. In the Breusch-Godfrey test we use a model  $$ e_t = \varepsilon_t + \beta_1 \varepsilon_{t-1} + \dots+ \beta_p \varepsilon_{t-p}. $$  If we reject the null hypotesis of no serial auotocorrelation of the error, it means that the residuals follow an auto-regressive model of order ($p$).  If I want to avoid this problem, I must add a certain number of lags of the response variable $y$ as regressors in the original model. However, in some cases this method is not useful.   Are there other options to consider? Is it true that $0.999999999\ldots=1$? I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is? Is 'acronymise/ze' a word? Is it used only colloquially, if at all? I just sent a text to a friend, who didn't understand an acronym I used for a game:      "Ah, I said it in a previous text so thought it was ok to abbreviate   it."   Though, since it was an acronym I had created, could I have used the word 'acronymise/ze' to be more specific?   I'm pretty sure it isn't a (formally used) word, but I wondered, as you often refer to acronyms specifically as acronyms, rather than abbreviations. Can you be more specific with a verb, too?  It sounds too odd to me, so I'm guessing generally no. But I wondered—so perhaps I'm wrong. Or half wrong. Is there a saying or idiom for "trying to get the truth from someone by lying"? context   Mary-Ann got home late from school.  Asked where she had been, she said she had spent the afternoon at the library.  Her father thinks she is lying and says: "I know you haven’t been there because I was there myself".  He is lying because he thinks she will tell the truth if she realizes she has been caught. boyfriend – “your sister told me everything” (sister did nothing) -  girlfriend – “Oh, did she? I’m gonna kill her.    The rationale for doing this is to catch someone by surprise so he will admit having lied.  Soemtimes, however, the person isn’t lying and the real liar will have to reap the consequences of his reproachable action, having to admit he was just/it was just ...........(saying or idiom)..... Recommended ways to upgrade AlwaysOn AG from 2014 to 2016 What is the recommended process of upgrading Availability Groups with one Sync Replica from SQL 2014 to 2016?  My understanding is that in-place upgrades are not really liked among database professionals. Is there a way to avoid in-place upgrades in Availability Groups? Is there a possibility to join a 2016 server into an existing 2014 availability group and to failover there, then "kill" one of the other instances and upgrade it? (e.g. by removing/re-installing SQL side-by-side on the same host)  Are there any other upgrade scenarios that we should consider?  The ideal solution would be that we always have 2 online replicas, and that we don't need to do any in-place upgrades. This is a problem from Rudin's Functional Analysis:  Show that there is a sequence of functions $\{ f_n \}$ in $X$ (the vector space of all complex functions) such that $f_n \to 0$ pointwise, but if any sequence $\{ \gamma_n \}$ tends to $\infty$, $\gamma_n f_n \not\to 0$.  The hint says to use the fact that the collections of all complex sequences converging to $0$ has the same cardinality as $[0,1]$. Honestly, this confused me more than it helped me.  My main issue is through the method of showing existence: I am not sure if I should attempt to construct an explicit sequence $f_n$, or if I need to appeal to other nonconstructive means such as Zorn's Lemma, etc. I have been trying to construct clever choices of sequences for a good bit now, but it always seems like I will be able to find a sequence that diverges slowly enough to allow that $\gamma_n f_n \to 0$.   Thanks! I've seen animated GIF images of screen casts (like the one below) promoted a few times on this site as a way to improve answers.    What toolchain is being used to create these? Is there a program that does this automagically, or are people taking screencasts, converting them into a series of static frames, and then creating the GIF images? Gmail filters/labels: Force email to stay in Inbox? How to create a soft or symbolic link? Was just wondering if there is any solid data available as to how many people are using ubuntu. I was also interested in the attrition rate with ubuntu users, etc. Read only field not working in page layout I have custom object called candidate. I have created field name called first name which is read-only in the page layout. Once a record is created with first name field populated I am able to edit that field. Why I am able to edit (I mean getting pencil icon). Can anyone suggest me for this issue? Walking up/down a level road/street Is walking up/down the road/street applicable if the street is not sloped?  I think I heard something about "with/against the numbering of houses" but I'm not sure if it's correct.  Also, if that were correct, why is walking down the street  than walking up the street? What is the longest word you can come up with that the letters are all in alphabetical order? It's Friday again, how about some fun to get us into the weekend?  What is the longest word you can come up with for which all the letters in that word are in alphabetical order?   Rules:   English words only    Can't be a name of a place, person or other proper noun.   if it contains the same letter twice in a row, that does not disqualify it.   No fair looking it up on Google!   Update: One more rule to help you guys out.   The word can be in either ascending or descending alphabetical order. Strange bug with "MessageName[a,b] is not of the form symbol::name ", Debugger & cursor location Can you please clarify if it's acceptable to use these terms interchangebly and if not point out to significant differences between these titles. It seems to me that it may be something with scale of an organization (perhaps, small/medium businesses have managing directors, and large corporations have chief executive officers) but I'm not sure. I do understand that a person may bear one or another of these titles formally, but what about real differences?