# 字符串统计

<p>从键盘输入一个包含有英文字母、数字、空格和其它字符的字符串&#xff0c;并分别实现下面的功能&#xff1a;统计字符串中出现2次的英文字母&#xff08;区分大小写&#xff09;
统计字符串中出现n次的数字&#xff0c;n从键盘输入</p>

## template

```python
#第一题
s=input('input a string:\n')
dict1={}
for c in s:
	if c.isalpha():
		if c not in dict1.keys():
			dict1[c] = 1
		else:
			dict1[c] += 1
for key in dict1.keys():
	if dict1[key]==2:
		print(key)
#第二题
s=input('input a string:\n')
n=int(input('input a n:\n'))
dict2={}
for c in s:
	if c.isdigit():
		if c not in dict2.keys():
			dict2[c] = 1
		else:
			dict2[c] += 1
for key in dict2.keys():
	if dict2[key]==n:
		print(key)
```

## 答案

```python

```

## 选项

### A

```python

```

### B

```python

```

### C

```python

```