题解 | #截取字符串#
截取字符串
https://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
string = input() n = int(input()) # 直接切片即可 print(string[0:n])
截取字符串
https://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
string = input() n = int(input()) # 直接切片即可 print(string[0:n])
相关推荐