当我在Matlab中工作时,我使用'end'来引用向量的最后一个元素.例如:
A(1, end)
其中A是2x2矩阵.
你能告诉我python中的等价命令是什么吗?例如,我有以下变量,作为字符串列表的元素:
dataList[loc] = ['%Case study: test\n']
所以最后一个元素应该是'\n'
python indexing matlab
indexing ×1
matlab ×1
python ×1