In main.py
i have this
import RemoveShortWords as rs
procLine="the in shear flow past a flat plate"
procLine = rs.RemomeOneTwoCharWords(procLine)
print(procLine)
and RemoveShortWords.py
is this
def RemomeOneTwoCharWords(procLine):
procLine = str(procLine)
for word in procLine.split():
if(len(word)<=2):
procLine = procLine.replace(word,"")
return procLine
print returns this
the sher flow pst flt plte
as you can see function removes words with less than 2 characters. But, for some reason, it removed all "a" characters too. For Example, "flat" became "flt"
Why?