From b2d68e2391a3bbccf265763bc385e3a305bb16d2 Mon Sep 17 00:00:00 2001 From: Phil Weir Date: Thu, 4 May 2023 15:10:07 +0100 Subject: [PATCH] pull out example.py --- 019-git/test/example.py | 16 ---------------- example.py | 9 +++++++++ 2 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 019-git/test/example.py create mode 100644 example.py diff --git a/019-git/test/example.py b/019-git/test/example.py deleted file mode 100644 index d146d91..0000000 --- a/019-git/test/example.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Text manipulation utilities -""" - -def capitalize(text): - if type(text) is not str: - text = ''.join(text) - return text.capitalize() - -def reverse(text): - return text[::-1] - -if __name__ == "__main__": - print(capitalize("testing")) - print(capitalize(['a', 'b', ' ', 'c'])) - print(reverse("Testing")) diff --git a/example.py b/example.py new file mode 100644 index 0000000..f5b8601 --- /dev/null +++ b/example.py @@ -0,0 +1,9 @@ +""" +This is an example Python file +""" + +def capitalize(text): + return text.upper() + +if __name__ == "__main__": + print(capitalize("testing"))