# P6.4 Loop मध्ये नवीन List कशी बनवायची?

Source: https://ravindrabagale.com/mr/datascience/py06-python-for-loops-and-while-loops-explained-with-examples/p6-4-how-to-build-a-new-list-inside-a-loop.html
Language: mr (Marathi with English technical terms)

हे का शिकायचं?

बऱ्याचदा प्रत्येक value बदलून नवीन list हवी असते — dollars चे rupees.

हे काय आहे?

रिकामी list घ्या, loop मध्ये नवीन value काढा आणि append() करा.

कसं करायचं?

Step 1. result = [] ने सुरुवात करा.
Step 2. Loop मध्ये value बदला.
Step 3. result.append() करा.

उदाहरण A: Dollars चे rupees

```python
usd = [10, 25, 40]
inr = []
for p in usd:
    inr.append(p * 83)
print(inr)
```

Output:

```text
[830, 2075, 3320]
```

याचा अर्थ: प्रत्येक price ला rate ने गुणून नवीन list मिळाली.

उदाहरण B: काही items च ठेवा

```python
orders = [250, 800, 1200, 300, 650]
big = []
for o in orders:
    if o > 500:
        big.append(o)
print(big)
```

Output:

```text
[800, 1200, 650]
```

याचा अर्थ: if मुळे फक्त condition पूर्ण करणारे items नवीन list मध्ये गेले.

रवींद्र बागले यांची tip

ज्या list वर loop चालू आहे ती बदलू नका. त्याऐवजी नवी list बनवा.
