From 3ebc2474d6d9a9cec5baa51b996cf17647482be5 Mon Sep 17 00:00:00 2001 From: yashkumarjha <55932900+yashkumarjha@users.noreply.github.com> Date: Thu, 7 Oct 2021 12:47:09 +0530 Subject: [PATCH] Count words in a sentence Please accept my PR --- Python/Count words in a sentence | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Python/Count words in a sentence diff --git a/Python/Count words in a sentence b/Python/Count words in a sentence new file mode 100644 index 0000000..1d26d8c --- /dev/null +++ b/Python/Count words in a sentence @@ -0,0 +1,3 @@ +text = input("Enter a sentence ") +res = len(text.split()) +print("The number of words in this sentence is ", res)