基于python3编程lintCode的rotate string,在pycharm内成功实现,为什么在lintcode运行出错

刚上手python,在lintcode刷到一个旋转字符串的问题,在pycharm上运行没有问题,但是在lintcode网页运行却提示错误结果,下面是自己写的代码。

def rotateString(s, offset):
    # write your code here
    str_length = len(s)
    str_new = s[str_length - offset:] + s[:str_length - offset]
    return str_new

str_old = 'abcdefg'

print(rotateString(str_old, 3))

在lintcode运行出现:
图片说明

求问各位大神问题出在哪里?