單項選擇題在Python中,如何將一個數(shù)字轉換為字符串?()

A.str(num)
B.num.toString()
C.convert(num)
D.num.str()


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題在Python中,如何將列表反轉?()

A.list.reverse()
B.reversed(list)
C.list[::-1]
D.所有以上的選項

2.單項選擇題在Python中,如何判斷一個對象是否可迭代?()

A.hasattr(obj,’__iter__’)
B.isinstance(obj,Iterable)
C.obj.isIterable()
D.A和B都對

3.單項選擇題在Python中,哪個函數(shù)用于獲取當前時間?()

A.time.now()
B.datetime.now()
C.time.current()
D.datetime.current()

4.單項選擇題在Python中,如何定義無限循環(huán)?()

A.while True
B.for _in infinite
C.loop:continue
D.goto start

5.單項選擇題在Python中,哪個符號用于格式化字符串?()

A.%
B..format
C.f-string
D.所有以上的選項