Python:两个语句之间的区别print(m)vs m

时间:2019-09-18 01:06:40

标签: python terminal output

enter image description here

m和print(m)有什么区别?

1 个答案:

答案 0 :(得分:1)

// define all locations you want to check in order public Vector3[] checkPositions; // radius to check for, depending on block size public float blockSize = 1.0f foreach (Vector3 checkPos in checkPositions) { if (Physics.CheckSphere (checkPos, blockSize)) { // found something Debug.Log('cannot spawn here!', checkPos); } else { // spot is empty, we can spawn refhead.transform.position = checkPos; head = (GameObject)Instantiate(refhead, parentTransform); break; } } 将显示m

如果repr(m)被定向到控制台,

print(m)将显示str(m)