📌  相关文章
📜  完成函数以返回给定字符串中最后 X 个字符 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:16.447000             🧑  作者: Mango

代码示例2
def getLast(mystring, x):
    y=len(mystring) - x                  #finding index from where the string needs to be printed
    for i in range(y,(len(mystring))):   # printing from y index to end of string
        print(mystring[i],end="")
    
getLast('WGU College of IT', 13)