题解 | #截取字符串#
截取字符串
http://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
while True:
try:
a = input() #字符串
b = int(input()) #截取几个字符
c = a[:b] #截取
print(c) #输出
except:
break
华为机试题解(prod.by kedao) 文章被收录于专栏
华为实习机试题解