请用程序实现
已知字符串 s ,请将另一个字符串 sub 添加到字符串 s 的指定索引位置中,并将添加后的 s 输出。
s = 'abcdefghijklmnopqrstuvwxyz'
sub=input()
pos=int(input())
str1=list(s)
str1.insert(pos,sub)
for i in range(len(str1)):
print(str1[i],end="")
请用程序实现
已知字符串 s ,请将另一个字符串 sub 添加到字符串 s 的指定索引位置中,并将添加后的 s 输出。
s = 'abcdefghijklmnopqrstuvwxyz'
sub=input()
pos=int(input())
str1=list(s)
str1.insert(pos,sub)
for i in range(len(str1)):
print(str1[i],end="")