Second part of task is to remove prefix, if any, form word and print it out.
Here is my code:
- Code: Select all
filename=raw_input("Insert name of file")
suffixes=['ing','an', 'er', 'x']
words = open("%s"%filename).read().split()
for i in words:
"""if word contains one of given suffixes(don't know how to do this lines):
If word contanis one of given prefixes:
Can you help me make line in quotes? Thanks in advance.