• 2022-06-18
    一个列表名为names,里面有old_driver,rain,jack,shanshan,peiqi,black_girl 元素, 以下用列表分片的方法访问前三个元素的语句正确的是:
    A: names[0:3]
    B: names[0:2]
    C: names[0:4]
    D: names[1:4]
  • A

    内容

    • 0

      返回names列表中Peiqi的索引值(下标)

    • 1

      names = ["Peiqi","Black"]numbers = [1,2,3]names.extend(numbers) # extend()方法表示合并print(names)代码的执行结果是_________.

    • 2

      2/4 下列选项中,哪一项可以把阿花加进列表 names ,排在老王之后?names = ['小明', '老王', '阿强'] A: names.append('阿花') B: names.insert(2, '阿花') C: names.insert(2, 阿花) D: insert(names, 2, '阿花')

    • 3

      ‘Baby’, ‘darling’ and ‘sweety’ are all examples of names that lovers might call each other. What is the expression which refers to names used in this way? ( ) A: love names B: omance names C: close names D: pet names

    • 4

      In Chinese names, given names come first while family names come last.