标签:out letter form als 格式 input pytho 一个 lan
输入一个字符串及字符,输出第一次出现该字符的位置。
index=X的, X表示查找到位置can‘t find letter X, X表示查找字符python
t
index=3
python
l
can‘t find letter l
s = input()
a = str(input())
b = True;
count = 0
for e in s:
count = count + 1
if e == a:
print("index=%d" % count)
b = False
break
if b == True:
print("can‘t find letter {}".format(a))
标签:out letter form als 格式 input pytho 一个 lan
原文地址:https://www.cnblogs.com/aimilu/p/11819149.html