编写一个程序,输入一个字符 串统计字符串中字母、数字及其他字符的个数。

编写一个程序,输入一个字符串统计字符串中字母、数字及其他字符的个数。



```python
s = input("输入一个字符串:")
letter_count = 0
digit_count = 0
other_count = 0

for char in s:
    if char.isalpha():
        letter_count += 1
    elif char.isdigit():
        digit_count += 1
    else:
        other_count += 1

print("字母个数:", letter_count)
print("数字个数:", digit_count)
print("其他字符个数:", other_count)


```