I have a iterable sequence nums = [1,2,3,4]. I want to create a generator function which, when next(nums) is used, will return the values one by one in reverse order. My goal is to do this using len(). I know the length of the list minus one would be the index of the last item in the list. How would I write the code for the output using len():      next(nums) 4     next(nums) 3     next(nums) 2     next(nums) 1   EDIT: Forgot to mention no other built-in functions are allowed.
So I can start from len(collection) and end in collection[0].  I also want to be able to access the loop index.
How to use "tens of" and "hundreds of"? If I'm not mistaken, tens of means 10 to 99 and hundreds of means 100 to 999. Is this correct? I found in some dictionaries that tens of is actually not correct.  I also found that hundreds of could also mean any arbitrary large number. So how would people usually interpret hundreds of? Based on context?  In my case, I want to describe numbers of some items that are usually 50-90 but sometimes could be around 100-200, but definitely not as many as 300 or so. I want to really emphasize that there are a lot of these items. In this case, can I say "... have tens or even hundreds of ..."? Would people misinterpret what I actually want to say? What's the difference between  and ,  and ? Why does node not evaluate Math.tan(Math.PI/2) to Infinity but Chrome V8 does? Does shoving a creature break its grapple on another? A situation came up in my session where a fighter used his Shield Master Shove feature to shove a Giant Crocodile that was currently restraining another PC using it's bite+grapple ability.  I did a quick check at the time and did not find anything related to shove, although in the  condition description it states:     The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell.   I ruled at the time that a shove would count in a similar way to being "hurled away" however I wasn't sure and said I would find more concrete information for the future.  I have searched high and low for somebody else asking this specific question but have yet to find it. I saw some reference to a Jeremy Crawford tweet about involuntary movement and grappling however I am unable to find it.  If a third party "shoves" a creature that is grappling another, does it only shove the grappler away, or does it move both the grappler and grappled?  I drew a diagram:   (; this question relates to if a third party shoves the grappler instead, so it's not a duplicate.) Why doesn't **sort** sort the same on every machine? Using the same sort command with the same input produces different results on different machines.  How do I fix that? If $\sin(a)\sin(b)\sin(c)+\cos(a)\cos(b)=1$ then find the value of $\sin(c)$ How do I delete Windows after an Ubuntu install? I downloaded Ubuntu 12.04 LTS to my Dell Dimension 4600 with Windows XP installed.  I now have a neat dual-boot system, but I want to get rid of the XP OS and keep Ubuntu as my only OS.  How do I do this? Why is it that the classical path gives the dominant contribution in the quantum mechanical path integral? How do we understand this? Euclidean geometry in non-inertial frame Programmatically, how does "rooting" a device enable access? Every partial order can be extended to a linear ordering How do I show that every partial order can be extended to a linear ordering?      I think that I manage to prove that claim for finite set, how can I prove it for infinite set?  Thank you. What is a subnet mask, and the difference between a subnet mask of 255.255.255.0 and 255.0.0.0? My DSL/WiFi router provided by my ISP has an internal IP address of 10.0.0.138, the addresses provided by DHCP are in the format of 10.0.0.xxx.  Now, I want to start using static IP addresses on my local network, and I don't know what to provide for the subnet mask.  What is a subnet mask?  Should I be using 255.255.255.0 or 255.0.0.0 as my subnet mask? What is the difference? Let $f(x)$ and $g(x)$ be two continuous functions on $[0,1]$ and  $$\int_{0}^{1}f(x) dx= \int_{0}^{1}g(x)dx = 1$$   Show that there exist  $[a,b]\subset [0,1]$, such that  $$\int_{a}^{b}f(x) dx= \int_{a}^{b}g(x)dx = \frac{1}{2} $$  The question can be solved by considering the fundamental group of $S^1$, now I am wondering if we can solve it by real-analysis.  Here is the topological solution:  Assume that for any $[a,b]\subset[0,1]$, we always have  $$(\int_{a}^{b}f(x) dx\neq \frac{1}{2}) \quad \vee \quad(\int_{a}^{b}g(x)dx \neq \frac{1}{2}) $$ Consider mapping $$\phi:D\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\},\,\,(x,y)\mapsto(\int_{y}^{x}f(t) dt,\int_{y}^{x}g(t) dt)$$ where $D=\{(x,y)|0\leq x\leq y\leq 1\}$.  Let $a$ be path from $(0,0)$ to $(0,1) $in $D$ and $b$ be path from $(0,1)$ to $(1,1) $in $D$, then $ab$ is a path from $(0,0)$ to $(1,1) $in $D$ and $$\phi\circ (ab):[0,1]\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\} $$ Notice that $$(\phi\circ (ab))(0)=(\phi\circ (ab))(1)=(0,0)$$  so $\phi\circ (ab)$ is a loop based on $(0,0)$ in $\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}$.  For any $t\in [0,\frac{1}{2}]$, it's not hard to get that $$(\phi\circ (ab))(t+\frac{1}{2})=(1,1)-(\phi\circ (ab))(t)$$ is equivalent to $$(\phi\circ (ab))(t+\frac{1}{2})-(\frac{1}{2},\frac{1}{2})=-((\phi\circ (ab))(t)-(\frac{1}{2},\frac{1}{2}))$$  Define retraction  $$r:\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}\rightarrow S^1,\quad (x,y)\rightarrow\ \frac{(x,y)-(\frac{1}{2},\frac{1}{2})}{||(x,y)-(\frac{1}{2},\frac{1}{2})||}$$  Then $r\circ \phi\circ (ab)$ is a loop on $S^1$, such that $$(r\circ \phi\circ (ab))(t+\frac{1}{2})=-(r\circ \phi\circ (ab))(t),\quad\forall t\in [0,\frac{1}{2}]$$  So $&lt;r\circ \phi\circ (ab)&gt;$ is not trivial in $\pi_1(S^1)$.   However, $ab$ is path homotopic to $c$ in $D$, where $c$ is the path between $(0,0)$ and $(1,1)$ in $D$. In this case, $r\circ \phi\circ (ab)$ is a point-path in $S^1$ by $$(\phi\circ c)(t)=\phi(t,t)\equiv (0,0)$$  which leads to contradiction. Close vote review audit flawed - fails without casting vote Having just  from any of the queues, it was reviewing close votes; however, this audit was flawed in that I didn't even cast a close vote.  Often I press the Close button to preview greater detail and sentiment of the closure, spawning the Why should this question be closed dialog box:    Especially for duplicates, where functionality is solely dependent on spawning this dialog.  From Closing > Duplicate, I can search or view selected duplicates:    Although, I realize general closure reasons are summarized on the page:    This question had 6-upvotes, but seemed very localized referencing subjective query is "taking too long" and even had a sqlfiddle link.  Maybe overly broad regarding performance tuning, the OP was posting like a forum with two answer posts to his own question  and  with one of those answers asking follow-up questions.    Wanting to gauge community response, current closure totals struck my curiosity.  So, I pressed the Close button and boom - oh, the humanity!  I failed, and didn't even cast a close vote.    Votes are not cast until a reason for closure is selected and Vote to Close is pressed.  Taking any review very seriously on this site, it only seems fair that my review quality is tested through actionable steps instead of clicking for more detailed information, leveraging the functional design of the close vote user interface.  Sure, it's complex to seed fake vote totals, and then there's controversy of mindless voting in the majority or people who simply cherry pick 4-vote questions.  Still though, it seems unfair I should hesitate to review further information of vote totals and duplicates before skipping due to the implementation of this audit. In eevee, shadows are clipped by camera distance As shown in the gif, the shadow in eevee is clipped by the camera distance. The same is true for F12 rendering. Where are the options to improve this issue? What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists. Why is jumping into water from high altitude fatal? Why do electron and proton have the same but opposite electric charge? What is the explanation between equality of proton and electron charges (up to a sign)? This is connected to the gauge invariance and renormalization of charge is connected to the renormalization of photon field, but is this explanation enough? Do we have some experimental evidence that quarks have 2/3 and -1/3 charges? By the way I think about bare charge of electron and proton. And I am also wondering if this can be explained by Standard Model. Possessive form of "one of [a list]"? SQL-Like Inner Join on IDs in Two Layers in QGIS Using QGIS v2.6.0-Brighton.  This question is not about editing layers geographically in anyway. It is merely trying to find data from two layers as you would in an SQL Query and append an extra ID to the second layer.  I have one polyline layer each identified with two different IDs. There is a point layer also with one of these IDs, I wish to find this corresponding ID and append them as a column to the point layer.  How do I do this without finding each row individually and typing it in manually (i.e. larger scale)? I would prefer to use SQL like syntax but if there is a GUI as well that would be ideal. Happy to install official plugins.