How can I subtract a list from a list for its value inside the list? So I want to be able to subtract a list to another list. For example, if I had two lists: x = [0,8,10] y = [1,7,9]  I would like to be able to basically subtract y[i] - x[i] using a FOR LOOP. So ultimately, inside the loop, it would go 1-0, 7-8, 9-10, and so on if the list is longer. Additionally, would there be any way to check if all or only one of the differences are equal to each other? Thank you.
Subtracting 2 lists in Python Right now I have vector3 values represented as lists. is there a way to subtract 2 of these like vector3 values, like  [2,2,2] - [1,1,1] = [1,1,1]   Should I use tuples?  If none of them defines these operands on these types, can I define it instead?  If not, should I create a new vector3 class?
Why isn't there a truly unified package manager for Linux? Why isn't there a unified package manager that acts as an interface between the end-user and the underlying low-level package manager (apt, yast, pacman, etc.)?  Is it hard to do and therefore not practical, or is there a genuine obstacle making it impossible to do? Show that if the smallest prime factor $p$ of the positive integer $n$ exceeds $\sqrt[3]{n}$, then $\frac{n}{p}$ must be prime or 1.  I'm stuck trying to prove this. I tried this using contradiction, but I haven't been able to prove it.  My approach:  Let $p$ be the smallest prime factor of the positive integer $n$.  Let $p &gt; \sqrt[3]{n}$  Then we must show that $\frac{n}{p}$ is either a prime number or 1.  We know that $n = pe$ for some $e \in \mathbb{Z}$.  Thus, $\frac{n}{p} = e$  We also know that $p$ > $\sqrt[3]{n}$, so $p^3 &gt; n$, and $p^2 &gt; \frac{n}{p}$  So, assume $\frac{n}{p} = e$ is not prime nor 1, meaning it's a composite number. Let's try to get a contradiction.  If $\frac{n}{p}$ is composite, then $\exists a,b \neq 1: \frac{n}{p} = ab $  Now, here's where I get stuck. What can I do with this info? $\frac{n}{p} = ab $ and $p^2 &gt; \frac{n}{p}$. How to pass arguments to addEventListener listener function? Is this a correct way for passing an environment variable in sudo ?  sudo -u www-data -b env FOOBAR="foobar" /home/user/folder/daemon How do I get past the "do not enter" traffic sign that stops me from installing "Sierra" instead of "High Sierra"?  I booted into rescue mode and deleted the original "High Sierra" installation, but booting from the USB stick with the "Sierra" installer on it still gives me the "no". How can I really disable the Cmd to Win key mapping in Parallels Desktop 5? Removed it from System Preferences &gt; Keyboard. No go. Remapped ⌘ Cmd to be Ctrl. No go. Ripping out the ⌘ Cmd key shouldn't be the solution. Anyone?... I am new to Ubuntu and Linux in general.  I created a dual boot OS on my laptop (Windows 10 and Ubuntu).    Typing: sudo apt-get install python3-tk (or even python-tk) didn't work. Trying to install the python3-dev or python-devel (no luck). Downloading Tcl and Tk to manually install.   In Windows 10 Bash Subsystem the Tk and Tcl are already included, so I thought Ubuntu already had it.  But, I want to use my Ubuntu desktop to develop Python GUI apps.   So, how can I install the Tcl/Tk to be use in Python 3.5 for GUI development?   I loaded Python 3.5.2 fine but need the GUI modules enabled.  The code to test that Tk is working is:      Type python3    Type:     import tkinter    tkinter._test()  Result: a GUI pop-up displaying This is a Tcl/Tk version.. Is it possible to reference an excel cell in a comment? I have an Excel balance sheet with a total at the bottom. On that cell I have a comment that says that the reason the total is X is because of what happens in J2. What happens if I insert another row before that, now my comment is wrong because all the rows jumped up a value.  Is there any way to reference a cell dynamically in an Excel commment? Is infinity a real number?  If not, why not?  I want some very good arguments.   Thanks.  $$\rightarrow\leftarrow\Huge\Huge\Huge\boldsymbol\infty$$ Delete duplicate records in SQL Server? Can a union be initialized in the declaration? If $I$ and $J$ are ideals in a ring $R$ with $1$ such that $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n \in \mathbb{N}$ If $I$ and $J$ are ideals in a ring $R$ with 1 which are  co-maximal, i.e $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n$ in $\mathbb{N}$  Work done:     Should I proceed using    By taking $$K=I^m+J^m \neq R$$  Let $$S=\{I,J \in R \mid I^m+J^n \neq R \}$$ be the required partially order set ordered by inclusion then  $$I+J \subseteq I^n+J \subseteq I^n+J^m \subseteq \ldots $$  Then, I think this chain doesn't have an upper bound...as $I^m+J^n \neq R$ for all $ m,n \in \mathbb N$. Am I right??  Thanks for any help!! Is there any software package to solve the linear regression with the objective of minimizing the L-infinity norm. Question involving discriminant of quadratic congruence in elementary number theory. Anyone can optimized this code for better explanation and easy to understand? Recommended way to initialize srand? I need a 'good' way to initialize the pseudo-random number generator in C++. I've found  that states:     In order to generate random-like   numbers, srand is usually initialized   to some distinctive value, like those   related with the execution time. For   example, the value returned by the   function time (declared in header   ctime) is different each second, which   is distinctive enough for most   randoming needs.   Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts.  I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom.  Thanks!  EDIT  Yes, I am actually starting my application multiple times a second and I've run into collisions. Definition of complex number In many situations (problems as well as solutions) I encounter the complex number $i$ which many times is defined as $i^2=-1$ instead of $i=\sqrt{-1}$, since it is "more preferred". Does anyone know why? Is it because there are two solutions to the equation $x^2+a=0, \ \ a&gt;0$? I'm taking Calculus II next semester so I don't have all the tools from it to back me up but something came up in a discussion this evening that asked me to prove that the following sequence converges. As I'm new to formal math I'm hoping someone can verify my proof, especially step $6$. I must prove that $$\lim_{n\to\infty}P_n=b$$ where $$P_{n+1} = P_n + \frac{b-P_n}{2}$$ $$P_0 = a$$ and $a,b \in \mathbb{R}$ such that $a&gt;b$ My proof goes as follows:   We must prove that $$\lim_{n\to\infty}P_n=b$$  That is, $\forall\epsilon&gt;0$ there exists a $\delta$ such that there exists an $n$ satisfying $$n&gt;\delta \iff b-P_n&lt;\epsilon$$  First, let us prove that $P_n$ is bounded by $b$ by contradiction. Let us choose an $i$ such that $P_i &lt; b$ and $P_{i+1}&gt;b$. Then we have $P_{i+1} = P_i + \Delta P$ where $\Delta P &gt; b-P_i$. but this is impossible because by the definition of the recurrence $\Delta P = \frac{b-P_i}{2} &lt; b-P_i$. Therefore, $P_i$ is bounded from above by $b$.  Additionally, it is trivial to show that $P_{i+1} &gt; P_i$.  With this in mind, choose an arbitrary $\epsilon$. We need to show that there exists an $n$ such that $P_n &gt; b-\epsilon$. Assume the contrary, that $P_n$ is bounded by $\epsilon$.  Using a similar argument to what which was used before, assume $P_n$ is bounded by $\epsilon$ and then there exists a $P_i$ such that $P_{i+1}\not &gt; P_i$. But this results in a contradiction with (4)  Therefore, $P_n$ is not bounded by $\epsilon$ and we have proved what we want to prove. How to change inside background color of UISearchBar component on iOS What is the best way to parse html in C#? I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.