美文网首页
Courcera题目集锦(一)

Courcera题目集锦(一)

作者: 米小河123 | 来源:发表于2019-12-03 11:46 被阅读0次
    1. What is the result of the following operation:
      [1,2,3]+[1,1,1]
    • [2,3,4]
    • [1, 2, 3, 1, 1, 1]
    • TypeError

    正确答案:[1, 2, 3, 1, 1, 1]

    1. What is the length of the list A = [1] after the following operation:
      A.append([2,3,4,5])
    • 5
    • 6
    • 2

    正确答案:2
    append-only adds one element to the list

    1. What is the result of the following:
      "Hello Mike".split()
    • ["Hello","Mike"]
    • ["HelloMike"]
    • ["H"]

    正确答案:["Hello","Mike"]
    the method split separates a string into a list based on the argument. If there is no argument as in this case the string is split using spaces.

    相关文章

      网友评论

          本文标题:Courcera题目集锦(一)

          本文链接:https://www.haomeiwen.com/subject/rdjvictx.html