# -*- coding: utf-8 -*-
#!usr/bin/env python3
#
# File name     : use_modules.py
# Description   : Demonstrate how to use and call the functions in the user-defined module.
# Creator       : Frederick Hsu
# Creation date : Thu.  31 Oct. 2019
# Copyright(C)  2019    All rights reserved.
#

import TextUtil

text = "a     puzzling    conundrum "
print(TextUtil.simplify(text))
Exemplo n.º 2
0
import TextUtil

print(TextUtil.is_balanced("(Python (is (not (lisp))))"))

print(TextUtil.shorten("The Crossing", 10))

print(TextUtil.simplify(" some text with spurious whitespace "))

print(TextUtil.is_included("test", "111111test11111"))

print(TextUtil.is_balanced_2("(Python (is (not (lisp))))"))

print(TextUtil.is_balanced_2("(Python )(is (not (lisp))))"))
Exemplo n.º 3
0
#!/usr/bin/env python3
import TextUtil
text="a    puzzling coundrum"
text=TextUtil.simplify(text)
print(text)

Exemplo n.º 4
0
import TextUtil

text = "    zahadny    \t\n hlavolam  "
text = TextUtil.simplify(text)
print(text)