0

How to convert input string in to list in python.

Convert string to list and count each letter of sentence

3rd Oct 2021, 3:13 PM
akshay atugade
4 ответов
+ 2
Here's how to count number of letters: num = len(str) - str.count(" ")
3rd Oct 2021, 3:23 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 2
Aleksei Radchenkov here - str.count(" ") asks pythons to do not count the space so if it is 8 then it ignores spacebar and give 7 Best example of maths we can give simple commands to Machines due to maths 😄.....
3rd Oct 2021, 6:01 PM
Sayyam Jain
Sayyam Jain - avatar
+ 1
And how you will count each letter in number Eg input=hi hello Count is 7
3rd Oct 2021, 3:18 PM
akshay atugade
0
list = input().split() That is covered in the Python course...
3rd Oct 2021, 3:16 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar