單項(xiàng)選擇題在Python中,如何導(dǎo)入一個(gè)模塊?()

A.import module
B.require(module)
C.include(module)
D.load(module)


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題在Python中,如何創(chuàng)建一個(gè)虛擬環(huán)境?()

A.python -m venv myenv
B.virtualenv myenv
C.venv.create(’myenv’)
D.A和B都對(duì)

2.單項(xiàng)選擇題在Python中,如何獲取當(dāng)前進(jìn)程ID?()

A.os.getpid()
B.process.id()
C.getpid()
D.sys.getProcessId()

3.單項(xiàng)選擇題在Python中,如何將一個(gè)字符串反轉(zhuǎn)?()

A.str[::-1]
B.str.reverse()
C.reverse(str)
D.reversed(str)

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

A.class SubClass(SuperClass):pass
B.class SubClass inherits SuperClass
C.class SubClass:super(SuperClass)
D.class SubClass ->SuperClass

5.單項(xiàng)選擇題在Python中,如何從JSON字符串中解析一個(gè)字典?()

A.json.loads(json_str)
B.json.parse(json_str)
C.dict.fromJSON(json_str)
D.parseJSON(json_str)