题解 | #截取字符串#python3
截取字符串
http://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
简单的字符串索引
while True:
try:
str1 = str(input())
num1 = int(input())
str2 = str1[0:num1]
print(str2)
except:
break
查看11道真题和解析