單項(xiàng)選擇題在Python中,如何創(chuàng)建一個(gè)集合?()

A.set ={}
B.set =set()
C.set =[]
D.set =newArray()


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題在Python中,如何創(chuàng)建一個(gè)列表?()

A.list =[]
B.list =list()
C.list =array()
D.list =newArray()

2.單項(xiàng)選擇題在Python中,如何創(chuàng)建一個(gè)字符串?()

A.str =""
B.str =str()
C.str =new String()
D.str =None

3.單項(xiàng)選擇題在Python中,如何關(guān)閉一個(gè)文件?()

A.file.close()
B.close(file)
C.file.terminate()
D.file.exit()

4.多項(xiàng)選擇題在Python中,如何刪除字典中的一個(gè)鍵值對(duì)?()

A.del dict[key]
B.dict.remove(key)
C.dict.delete(key)
D.dict.pop(key)

5.單項(xiàng)選擇題在Python中,如何檢查一個(gè)元素是否存在于列表中?()

A.item in list
B.list.contains(item)
C.list.indexOf(item)!=-1
D.A和C都對(duì)