I'm trying print the day ranges from today up to a year ago. So i can apply this to a sql query in my other code. I know my algorithm works but i need to subtract 1 day from the format '2014-05-15' Here is the code  from datetime import date, timedelta import datetime current_date = datetime.date.today() datecounter = 0 while datecounter != 365:     print current_date     date_start = current_date     print date_start     # current_date = current_date.timedelta(days=1)     print current_date     print 'the date is between', date_start, 'and', current_date     datecounter += 1   im looking for this code to output  the date is between 2014-05-16 and 2014-05-15 the date is between 2014-05-15 and 2014-04-14   etc  i wrote a contrived example based on the logic, if you would like to run it yourself, you may better understand what i am trying to do.  x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] curdate = 5 for i in x:     print curdate     date_start = curdate     curdate = curdate - 1     # print curdate       print ' the date is between', date_start, 'and', curdate     print ' ---------- '
I have a Python  object. What is the best way to subtract one day?
Is the following conjecture true?     Given an $n&gt;1$ and a $k$ such that $0&lt;k&lt;n$ then $\gcd\left(\binom{n}{k}, n\right)&gt;1$   This was a question asked in my old Number Theory course that I recently remembered. It was posed after we learned that $p\mid\binom{p}{k}$ for $0&lt;k&lt;p$. We never resolved it either way. I expect it to be true and have an elegant answer, but I haven't been able to prove it. Proof a $(2n-1)$-compact manifold I have no idea how prove that $$\{(z_0,\ldots,z_n)\in\mathbb{C}^{n+1} \quad| \quad z_0^d+z_1^2\ldots+z_n^2=0, \quad |z_0|^2+|z_1|^2\ldots+|z_n|^2=2\}$$ is a $(2n-1)$-compact manifold.  How give the charts. For $n=1$ and $d=2$ not distinguish which 1- manifdold is? Is it possible to overload the null-coalescing operator for a class in C#?    Say for example I want to return a default value if an instance is null and return the instance if it's not. The code would look like something like this:     return instance ?? new MyClass("Default");     But what if I would like to use the null-coalescing operator to also check if the MyClass.MyValue is set? How do I write a mathematical equation for ARIMA (2,1,0) x (0,2,2) period 12 If low-cost index funds are considered the best investment, why are there so many high-cost, managed funds? How do I install libtiff.so.3? When I try to run Maya from the terminal, I get:  error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory.   How do I solve this?  Note: Maya is a third-party software. Stack Exchange doesn't allow me to answer protected questions because I gave away earned rep in bounties How many nonnegative integer solutions are there to the pair of equations  \begin{align}x_1+x_2+\dots +x_6&amp;=20  \\ x_1+x_2+x_3&amp;=7\end{align}  How do you find  non-negative integer solutions? Proving that $A+A \not\subset 2A $ using a particular definition for sum of sets Let $X$ de a vector space and $A\subset X$. If we define $A+B :=\{a+b|a\in A, b\in B\}$ I am trying to show that    $$ \begin{equation} 2A \subsetneq A+A, \end{equation} $$  i.e., it might happen that $2A \neq A+A$. I was able to show that $2A \subset A+A$, but I am not able to come up with a counterexample to show that the converse is not necessarily true. If I assume $A+A\subset 2A$ and let $x\in(A+A)$, then by its definition we have $x=a_1 + a_2$ for some $a_1,a_2\in A$ I guess I could naively say that $a_1+a_2 = 2(a'_1+a'_2)$ where $a_i=a_i/2$ for $i=1,2$ and I guess $(a'_1+a'_2)$ might not be an element of $A$ in some concrete case but I am not able to come up with anything and I've spent more time than I would like to admit. Any suggestions?  Thank you. Where is the "Manipulate Centers Only" button in Blender 2.8? I have looked just about everywhere on the Internet and I can't find the answer to this question. Where the hell is the "Manipulate Centers Only" button in Blender 2.8???? It's the the double arrow icon here:    I seem to have enabled it somehow and I can't scale or rotate my object. Why does no physical energy-momentum tensor exist for the gravitational field? Is it bad to marinate meat for too long? From my experience it is always best to marinate meat for a decent amount of time, so the meat can "soak" up the marinade and be more flavourful.  However, I came across this recipe here:   In the directions, it says: Add pork and marinade for a minimum of 6 hours or overnight, but no longer than 12 hours.  I was wondering, why does it say "no longer than 12 hours"? Isn't it good to let meat marinate for as long as possible?  Thanks. Two Circles and Tangents from Their Centers Problem Let $\Gamma_1$ and $\Gamma_2$ be two non overlapping circles with centers $O_1$ and $O_2$ respectively. From $O_1$, draw the two tangents to $\Gamma_2$ and let them intersect $\Gamma_1$ at points $A$ and $B$. Similarly, from $O_2$, draw the two tangents to $\Gamma_1$ and let them intersect $\Gamma_2$ at points $C$ and $D$.  Prove that $AB=CD$.  I've done some extensive angle chasing on this but have been unable to make any real progress. Can't decide whether $ABCD$ is supposed to be rectangle (as in my diagrams), a parallelogram or even a trapezium. There is a homothety taking one circle to the other but as far as I can see this doesn't help as we don't have a clearly defined center to this.  Any help/hints would be greatly appreciated. There is an experimental timeline view for questions now available on meta ONLY! (Now working on SO, SF, and SU as well)  This is partially motivated by comments about how difficult it is to follow very active questions which have a lot of activity, and also the feedback on the API which was heavily dominated by "we need to know what happened in this time range" type responses.  It can only be accessed through URL hackery at the moment. To get to it, enter question URLs like so:  https://meta.stackexchange.com/posts/{id}/timeline  This is a chronological timeline of everything that happened on a question, including   initial question ask answers  revisions comments closure, deletion, reopen, undelete, etc votes   all based on when they happened in chronological order.  We are thinking about making this a fourth tab on the question, like so:  Timeline | Oldest | Newest | Votes  Please try it out and provide feedback. It is still a little rough, so we are not looking for highly detailed bug reports, just more general feedback.  Timeline view for this question: LG Nexus 4 compatibility Airtel India Possible Duplicate:          I plan to purchase the LG Nexus 4 from the US on the release date (13th November). The phone claims to be unlocked. But will it be compatible with Airtel in India for both data and call services? When documenting a style file, it would be nice to be able to easily put side by side different examples of code, side-by-side with the output they produce.  What recommendations to people have to do this efficiently, and &aelig;sthetically? How to remove trailing whitespaces with sed? I have to resit a calculus exam and for some reason set proofs were never my best friend...  Anyway, on a practice exam I encountered the following proof:  $$A\cap(B\cup C) = (A\cap B)\cup(A\cap C)$$  When I draw a Venn-diagram it seems quite obvious but I couldn't manage to write the proof down properly.  If someone could help me, that'd be great! I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert. Variable declaration placement in C