#Подготавливаем данные
stopWords = [ "a" , "i" , "it" , "am" , "at" , "on" , "in" , "to" , "too" , "very" , \
"of" , "from" , "here" , "even" , "the" , "but" , "and" , "is" , "my" , \
"them" , "then" , "this" , "that" , "than" , "though" , "so" , "are" ]
noStemWords = [ "feed" , "sages" , "yearling" , "mass" , "make" , "sly" , "ring" ]
lines = [ "I've seen things you people wouldn't believe." ,
'Attack ships on fire off the shoulder of Orion.' ,
'I watched C-beams glitter in the dark near the Tannhäuser Gate.' ,
'All those moments will be lost in time, like tears in rain. Time to die.' ]
#Делаем все остальное
print ( { word:'строка#' + str ( number) for word, number in [ ( word.rstrip ( 'ing' ) , number) if word in noStemWords else ( word, number) for number, line in enumerate ( lines) for word in line.split ( ) if word not in stopWords] } )
I9Cf0L7QtNCz0L7RgtCw0LLQu9C40LLQsNC10Lwg0LTQsNC90L3Ri9C1CnN0b3BXb3JkcyA9IFsgImEiLCAiaSIsICJpdCIsICJhbSIsICJhdCIsICJvbiIsICJpbiIsICJ0byIsICJ0b28iLCAidmVyeSIsIFwKICAgICAgICAgICAgICAib2YiLCAiZnJvbSIsICJoZXJlIiwgImV2ZW4iLCAidGhlIiwgImJ1dCIsICJhbmQiLCAiaXMiLCAibXkiLCBcCiAgICAgICAgICAgICAgInRoZW0iLCAidGhlbiIsICJ0aGlzIiwgInRoYXQiLCAidGhhbiIsICJ0aG91Z2giLCAic28iLCAiYXJlIiBdCiAKbm9TdGVtV29yZHMgPSBbICJmZWVkIiwgInNhZ2VzIiwgInllYXJsaW5nIiwgIm1hc3MiLCAibWFrZSIsICJzbHkiLCAicmluZyIgXQoKbGluZXMgPSBbIkkndmUgc2VlbiB0aGluZ3MgeW91IHBlb3BsZSB3b3VsZG4ndCBiZWxpZXZlLiIsCiAgICAgICAgICdBdHRhY2sgc2hpcHMgb24gZmlyZSBvZmYgdGhlIHNob3VsZGVyIG9mIE9yaW9uLicsCiAgICAgICAgICdJIHdhdGNoZWQgQy1iZWFtcyBnbGl0dGVyIGluIHRoZSBkYXJrIG5lYXIgdGhlIFRhbm5ow6R1c2VyIEdhdGUuJywKICAgICAgICAgJ0FsbCB0aG9zZSBtb21lbnRzIHdpbGwgYmUgbG9zdCBpbiB0aW1lLCBsaWtlIHRlYXJzIGluIHJhaW4uIFRpbWUgdG8gZGllLiddCiAgICAgICAgIAoj0JTQtdC70LDQtdC8INCy0YHQtSDQvtGB0YLQsNC70YzQvdC+0LUKcHJpbnQoe3dvcmQ6J9GB0YLRgNC+0LrQsCMnKyBzdHIobnVtYmVyKSBmb3Igd29yZCwgbnVtYmVyIGluIFsod29yZC5yc3RyaXAoJ2luZycpLCBudW1iZXIpIGlmIHdvcmQgaW4gbm9TdGVtV29yZHMgZWxzZSAod29yZCwgbnVtYmVyKSBmb3IgbnVtYmVyLCBsaW5lIGluIGVudW1lcmF0ZShsaW5lcykgZm9yIHdvcmQgaW4gbGluZS5zcGxpdCgpIGlmIHdvcmQgbm90IGluIHN0b3BXb3Jkc119KQo=
stdout
{'lost': 'строка#3', 'will': 'строка#3', 'fire': 'строка#1', 'Tannhäuser': 'строка#2', 'Orion.': 'строка#1', 'seen': 'строка#0', "wouldn't": 'строка#0', 'tears': 'строка#3', 'people': 'строка#0', 'Time': 'строка#3', 'those': 'строка#3', 'near': 'строка#2', 'watched': 'строка#2', 'shoulder': 'строка#1', 'you': 'строка#0', "I've": 'строка#0', 'like': 'строка#3', 'Attack': 'строка#1', 'things': 'строка#0', 'Gate.': 'строка#2', 'believe.': 'строка#0', 'ships': 'строка#1', 'dark': 'строка#2', 'moments': 'строка#3', 'be': 'строка#3', 'I': 'строка#2', 'off': 'строка#1', 'All': 'строка#3', 'glitter': 'строка#2', 'rain.': 'строка#3', 'die.': 'строка#3', 'time,': 'строка#3', 'C-beams': 'строка#2'}