6 lines
316 B
Python
6 lines
316 B
Python
rhyme = str(input('Enter the 1st. line of nursery rhyme : '))
|
|
start = int(input('Enter start number for display : '))
|
|
end = int(input('Enter end number for display : '))
|
|
# 截断字符串包含start位不包含end位
|
|
print('this is the 1st. line \n {0} \n and this is truncated {1}'.format(rhyme, rhyme[start:end]))
|