Subtracting 2 lists in Python
问题 Right now I have vector3 values represented as lists. is there a way to subtract 2 of these like vector3 values, like [2,2,2] - [1,1,1] = [1,1,1] Should I use tuples? If none of them defines these operands on these types, can I define it instead? If not, should I create a new vector3 class? 回答1: If this is something you end up doing frequently, and with different operations, you should probably create a class to handle cases like this, or better use some library like Numpy. Otherwise, look