321
def getImpuList2(impu,number): records = second = impu.index('@') import re pat = re.compile('\d+') lis = pat.findall(impu) s1=lis first = impu.rindex(s1) maxLength = second- first if maxLength>len(s1): second = first + len(s1) newImpuList = range(int(s1),int(s1)+int(number),1) for x in newImpuList: print x ,type(x) record = impu+str(x)+impu records.append(record) return records