Q5.`P` is a non-empty list of distinct integers that has already been defined. Which of the following statements are true at the end of execution of the code given below?
```
Q, R = [], []
for x in P:
Q.append(-x)
Q.sort()
for x in Q:
R.append(-x)
```
Save
Check
Details
Q5
13 Jul 2025
Q5.`P` is a non-empty list of distinct integers that has already been defined. Which of the following statements are true at the end of execution of the code given below?
```
Q, R = [], []
for x in P:
Q.append(-x)
Q.sort()
for x in Q:
R.append(-x)
```