diff --git a/022_title_case.py b/022_title_case.py new file mode 100644 index 0000000..e86ba84 --- /dev/null +++ b/022_title_case.py @@ -0,0 +1,6 @@ +def title_case(title, minor_words=''): + title = title.capitalize().split() + minor_words = minor_words.lower().split() + return ' '.join([word if word in minor_words else word.capitalize() for word in title]) + +