关键思路: 将字符列表转换成字符串,通过拼接
str_in = input()
x = int(input())
str_ou =[]
for i in range(x):
str_ou.append(str_in[i])
# 拼接字符串
str_out = "".join(str_ou)
print(str_out)
关键思路: 将字符列表转换成字符串,通过拼接
str_in = input()
x = int(input())
str_ou =[]
for i in range(x):
str_ou.append(str_in[i])
# 拼接字符串
str_out = "".join(str_ou)
print(str_out)