Python Fundamentals Question

Hello all,
I am studing Python fundamentals
and I have got a question:
8. Isolating the Free Apps
Code:
for app in android_english:
price = app[7]
if price == ‘0’:
android_final.append(app)

why we put here price is == ‘0’ ?
yes. I understand that is means free but in txt file what we downloaded there is str “Free”

Hi @andriy-zubrytskyy, welcome to our forums :slight_smile:

When copying over code, it’s good practice to use markdown formatting to render your code appropriately - you do this by adding 3 back-ticks (```) before and after your code.

So for instance doing this:

```
for app in android_english:
price = app[7]
if price == ‘0’:
android_final.append(app)

```

Would cause the above to render as:

for app in android_english:
    price = app[7]
    if price == '0':
        android_final.append(app)

Your question is answered by looking at the names of the column headers of Android Apps:

['App', 'Category', 'Rating', 'Reviews', 'Size', 'Installs', 'Type', 'Price', 'Content Rating', 'Genres', 'Last Updated', 'Current Ver', 'Android Ver']

The header under which you were seeing the string "Free" was actually Type. There is another header that numerically represents the price with a ‘0’ if it’s free (although this ‘0’ is still a string!).