!curlhttps://raw.githubusercontent.com/MicrosoftLearning/intropython/master/elements1_20.txt -o elements1_20.txt elements = open('elements1_20.txt', 'r') elements_lines = elements.readlines()  count = 0  for line in elements_lines:     elements_lines[count] = line[:-1].lower()     count += 1  print(elements_lines)  ['hydrogen', 'helium', 'lithium', 'beryllium', 'boron', 'carbon', 'nitrogen', 'oxygen', 'fluorine', 'neon', 'sodium', 'magnesium', 'aluminum', 'silicon', 'phosphorus', 'sulfur', 'chlorine', 'argon', 'potassium', 'calciu']   As you can see the last element of list is not showing in full? can somebody help me to do so.
What is the Python equivalent of Perl's chomp function, which removes the last character of a string if it is a newline?
Are nested functions a bad thing in gcc ? Series involving log $\sum_{n=1}^{\infty} \left( n\log \left(\frac{2n+1}{2n-1}\right)-1\right) = \frac{1-\log 2}{2}$ Can someone explained, as detailed as possible, the differences between the following types?  List List&lt;Object&gt; List&lt;?&gt;   Let me make this more specific. When would I want to use  // 1  public void CanYouGiveMeAnAnswer(List l) { }  // 2 public void CanYouGiveMeAnAnswer(List&lt;Object&gt; l) { }  // 3 public void CanYouGiveMeAnAnswer(List&lt;?&gt; l) { } Could someone please explain the differences between the 3 fitting methods, method = c("CSS-ML", "ML", "CSS"), in Arima?  If I run the code below I get an error message, but if I specify method="ML" in Arima it runs fine.  So I was curious what the difference was between the 3 fitting methods.  Code with error:  library("fpp")  tsTrain &lt;- window(hsales,end=1989.99)  pvar&lt;-1:10 dvar&lt;-1:2 qvar&lt;-1:7  OrderGrid&lt;-expand.grid(pvar,dvar,qvar)  n &lt;- function(a,b,c) {Arima(tsTrain, order=c(a,b,c))} ModFit &lt;- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))   Fixed Code:  library("fpp")  tsTrain &lt;- window(hsales,end=1989.99)  pvar&lt;-1:10 dvar&lt;-1:2 qvar&lt;-1:7  OrderGrid&lt;-expand.grid(pvar,dvar,qvar)  n &lt;- function(a,b,c) {Arima(tsTrain, order=c(a,b,c),method="ML")} ModFit &lt;- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid)) What should I do if I lost money in a scam? I live in New Jersey and my son wanted to order some toys from this guy who said he makes them in his house and he could give him the best deal, but before he could send these toys he needed my 16 year old son to put $200 into his bank account. The guy then gave my son his wells Fargo bank account info and told him as soon he deposits the money he will ship his toys. Well, that never happened.  My son called the guy up and he told my son, “I’m only the middle guy, and my boss is in Nigeria and you need to put another $200 in my account because now I have to ship the toys from elsewhere.” So my son deposited another 200 dollars into this guys bank account.  My son has sent these jerks a total of $650. Is there anything I can do to these individuals? At this point even if I don’t get the money back it’s okay but I don’t want this happening to other kids and I want to teach these guys a lesson that you’re not above the law. The guy is still calling my son up saying that he is pissed off that he didn’t get more money.  What can I do now? I've heard that in the study of finite fields, and other concepts related to finite fields, mathematicians have found a sort of gap: there are various results and things that seem like they correspond to a field with one element, $\mathbf{F}_1$, even though there is no such field. Of course, there is an object which seems similar to a field with one element: the zero ring, $\mathbf{Z}_1$, defined as having one element, $0$, obeying the equations $$0 + 0 = 0 - 0 = 0 \cdot 0 = 1 = 0.$$ The zero ring seems to behave like a field in every respect, except for the fact that it fails to satisfy $0 \ne 1$. (But the importance of the axiom $0 \ne 1$ isn't clear to me.) However, in any case, there seems to be consensus that the zero ring is not the field with one element. People say that the zero ring &quot;does not behave like a finite field&quot; () or that it &quot;does not have the features that mathematicians need&quot; (). I'm not familiar enough with algebraic geometry to understand the properties that $\mathbf{F}_1$ is expected to have. Is there an elementary, undergraduate-level explanation of  why it seems like a field with one element &quot;ought to exist&quot; in the first place, what properties we expect it to have and why, and how the zero ring fails to satisfy these properties?  Or do I need to study algebraic geometry if I want to have an understanding of any of this? (A side question: do we have a good answer to the question of whether the single element of $\mathbf{F}_1$ ought to be $0$, $1$, both, or neither?) I made chili and it's too hot! If I cook it longer will the heat calm down? crisscross, dillydally, riffraff, etc Automatically inserting "Section", "Subsection", etc Ubuntu 14.04 slow wireless connection Collapsing a stream of multiple lines into one line I have a file containing a a large number of lines, each of which contains a bunch of numbers which are separated by spaces. I process this data in a pipe in some way, and then I want to collapse the multiple lines into a single line of all the numbers separated by spaces.  Is there a standard command-line utility I can use to do this? It seems like most line-by-line utilities won't mess with the newlines... How to replace text between quotation marks with something from another file? I have the following kind of text: $OU = 'or'; $DINHEIRO_CAIXA = 'Cash balance'; $PAGINA = 'Page'; $DE = 'from'; $ENVIAR = 'Send'; $PRINCIPAL = 'Main';  I've already got all the text within the single quotation marks using cat arquivo | grep -oP &quot;'[^']+'&quot; | tr -d &quot;'&quot; This extracted text was then translated to Portuguese, but now I don't know how to replace the original text between single quotation marks with the translated text, I was looking for something like $OU = 'ou'; $DINHEIRO_CAIXA = 'Dinheiro em caixa'; $PAGINA = 'Pagina'; $DE = 'de'; $ENVIAR = 'enviar'; $PRINCIPAL = 'Principal';  I've tried using grep -F to replace the file itself, but it failed miserably because the pattern didn't match since I don't have the quotation marks on the new file, is there a way to do this? The gluing lemma for closed sets states:     Given a finite closed cover $\{A_i\}$ of a topological space $X$, together with continuous maps $\{f_i : A_i \to Y\}$ into some other topological space $Y$, there exists a unique continuous map $f : X \to Y$ whose restriction to each $A_i$ is equal to $f_i$.   Question: What is a good and simple counter-example when the gluing lemma fails in the case that $\{A_i\}$ is infinite, but countably so.  My attempt: I have only been able find a silly counter-example: let $\{A_\alpha\}$ be the collection of all points of $X = [0,1] \subset \mathbb{R}$, and let $f_\alpha = 0$ for all $\alpha$ except for $\alpha = \alpha_0$, for which $A_{\alpha_0} = \{0\}$ and $f_{\alpha_0} = 1$. Initial value problem $t\frac{dx}{dt}=x+\sqrt{t^2+x^2}$ Upgrade or replace a Wubi installation? I've got Windows 7 with Wubi 11.10 installed. I would like to upgrade to 12.04 but I'm not sure what the best path would be.  I'm not skilled enough to use Ubuntu all the time, and my iPhone requires me to run some Windows version for the damn iTunes software. I would love to run Windows XP but I can't figure out how to install it via USB -- my computer has no cd drive.  I'd like to run Windows XP and Wubi 12.04 on top of that. Or, perhaps, Ubuntu 12.04 natively and Windows XP alongside of that. So I guess I have 2 questions:   (lazy) Should I upgrade my Wubi from inside Ubuntu, or should I remove Wubi 11.10 from within Windows and install a brand new Wubi 12.04? (proper) How can I install Windows XP and Ubuntu 12.04 alongside each other?   Update: I am going to create a separate question post about the above #2 question... I realize it's wrong to ask two questions in one post when they are that different. Function representing a forest fire after one time step I want to update my sources.list file with the fastest server from the command line in a fresh Ubuntu Server install. I know this is trivially easy with the GUI, but there doesn't seem to be a simple way to do it from from the command line? In indirect speech we generally backshift the tense. For ex - Direct speech : "I am the most powerful person." Indirect speech : "He said that he was the most powerful person."  What if someone reports like -  He denied the charges claiming that he is/was the most powerful person. So here which is correct- is or was ?  Thanks in advance. When using the Gmail preview pane lab, fastest way to get a direct link to a conversation? In vanilla Gmail, clicking on a conversation alters the fragment ID in the URL, allowing you to link back to that conversation.  (It opens in its own Gmail interface.)  I am using the preview pane, which is great, except that the URL no longer updates when viewing specific emails, so there appears to be no way to get the link to the currently-viewed conversation.  (The 'open in new window' button doesn't help, since it pulls its contents in on the client side; it isn't a standalone link.)  The only solution I've found is to turn off the preview pane, find the message again in the list, open it, grab the link, go back to the message list, and turn preview pane back on.  That's fairly onerous for something I do often though (to clip Gmail conversations to Evernote, where my GTD setup lives). Has Wonder Woman ever killed a mortal in anger?