• 2022-05-28
    关于Python字符串操作的描述,错误的是()
    A: >>>
    "hellohellohello"/3
    输出结果是"hello"
    B: >>>
    "hello"*2
    输出结构是'hellohello'
    C: >>>
    'hello' + 1
    输出结果是
    Traceback (most
    recent call last):
    File
    "", line 1, in
    "hello"
    + 1
    TypeError: must be
    str, not int
    D: >>>
    "hello" - "world"
    输出结果是
    Traceback (most
    recent call last):
    File
    "", line 1, in
    "hello"
    - "world"
    TypeError:
    unsupported operand type(s) for -: 'str' and 'str'
  • 举一反三