#!/usr/bin/env python # -*- coding: utf-8 -*- # learn <<Problem Solving with Algorithms and Data Structures>> # Release 3.0 # chengang882 @ 2016-12-21 # Completed implementation of a Unordered List ADT class Node(object): def __init__(self, in
def abc(str,data): count = [] numMax = 0 for a in range(len(str)): if a == 0: temp = str.find(data, numMax, len(str)) else: temp = str.find(data, numMax+1, len(str)) if temp != -1: for i in range(len(data)): count.append(temp + i) elif numMax == 0 an