例子1:
s="PYTHON"
while s !="":
for c in s :
if c == "T":
break
print(c,end="")
s=s[:-1]
》》》PYPYPYPYPYP
例子2:
s="PYTHON"
while s !="":
for c in s :
if c == "T":
break
print(c,end="")
s=s[:-1]
》》》TTTTYP
例子1:
s="PYTHON"
while s !="":
for c in s :
if c == "T":
break
print(c,end="")
s=s[:-1]
》》》PYPYPYPYPYP
例子2:
s="PYTHON"
while s !="":
for c in s :
if c == "T":
break
print(c,end="")
s=s[:-1]
》》》TTTTYP
转载于:https://www.cnblogs.com/oycc2000/p/11229577.html