This For-loop seems not to work

Hi there Guys,

Presently working on solving the first guided project. I’m at the stage where I need to print some duplicate apps to show that there are duplicates in the data-set. I typed in the code below but its not printing any out put.

    name = my_googleApps[0]
    if name == 'Instagram':
        print(app)

Please Help

Best Regards,
Olubaji

Hi @olubaji22!

When copy-pasting your code over from your IDE into a text medium that offers markdown formating (like most forums wherein code-related discussions take place), it’s good practice to envelop your code in 3 back-ticks (meaning you just add ``` before and after your code) so it preserves some of its code-formatting.

Edit your OP with the following to see what I mean:

```
for app in my_googleApps:
name = my_googleApps[0]
if name == ‘Instagram’:
print(app)
```

Anyway, what seems to be wrong with your for loop is that you’re only interacting with the entire list that’s being iterated over, when you do name = my_googleApps[0], since my_googleApps is the name of the entire iterable.

Perhaps you wanted the following instead:

for app in my_googleApps:
    name = app[0] #Here, it's indexing each element of the list
        if name == ‘Instagram’:
        print(app)

Thanks alot @blueberrypudding85