Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Analysis Glitch #167

Open
ironstrider opened this issue Aug 7, 2015 · 0 comments
Open

Static Analysis Glitch #167

ironstrider opened this issue Aug 7, 2015 · 0 comments

Comments

@ironstrider
Copy link
Contributor

Encountered in P10 on 6/8/15

def occurrences(text1, text2):
    total=0
    listchars="x"
    for i in text1:
        if i not in listchars:
            listchars += i
    for j in text2:
        if j in listchars:
            total += 1

    return total

Your for loop should iterate over the second argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant