Skip to content

PSET 2 plates.py misses a few case while checking to see if a num is followed by a char #12

@shivamjxin

Description

@shivamjxin

From line 29 - 34 in PSET 2 plates.py
s.index(character) will return the first occurrence of the character in the string if multiple same characters are present not the current index.
Instead using
enumerate would return both the current index location and the character
Something like this would work for cases like AAA1A1
for index, character in enumerate(s):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions