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

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


您可能感興趣的試卷

你可能感興趣的試題

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

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

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

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

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

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

4.單項(xiàng)選擇題在Python中,如何向一個(gè)列表的末尾添加元素?()

A.list.append(item)
B.list.add(item)
C.list.insert(len(list),item)
D.A和C都對(duì)

5.單項(xiàng)選擇題在Python中,如何停止一個(gè)無(wú)限循環(huán)?()

A.break
B.stop
C.exit
D.return