Courcera题目集锦(一)

2019-12-03  本文已影响0人  米小河123
  1. What is the result of the following operation:
    [1,2,3]+[1,1,1]

正确答案:[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])

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

  1. What is the result of the following:
    "Hello Mike".split()

正确答案:["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.

上一篇下一篇

猜你喜欢

热点阅读