In [16]:
"""
An example to show numeronyms on the Five Laws of Library Science
"""
global fiveLaws
fiveLaws = [ "Books are for use", "Every book its reader",
"Every reader his book", "Save the time of the reader",
"Library is a growing organism"]
def i18nify(law):
yield law[0] + str((len(law)-2)) + law[-1]
def main():
for law in fiveLaws:
print law
print(i18nify(law).next())
if __name__ == '__main__':
main()
In [ ]: