View Code of Problem 98

try:
    while True:
        s = input()
        if s == '<xmp>' or s == '</xmp>':
            continue
        else:
            start = s.find('>')+1
            end = s.find('<',start)
            name = s[start:end]
            t = 4
            while t:
                t -= 1
                s = input()
                if s.find('In Stock') != -1:
                    print(name)
except EOFError:
    pass

Double click to view unformatted code.


Back to problem 98