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

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


您可能感興趣的試卷

你可能感興趣的試題

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

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

2.單項(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

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

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

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

A.json.dumps(dict)
B.dict.toJSON()
C.json.stringify(dict)
D.dict.toString()

5.單項(xiàng)選擇題在Python中,如何復(fù)制一個(gè)列表?()

A.list.copy()
B.copy(list)
C.list[:]
D.A和C都對(duì)