idx = 10
orbit = 150
num = 360
train_image_addr = '../MATLAB/x_data/x'+'%04d'%idx+'_%d'%orbit+'_%d.jpg'%num



参考资料:  [1]


Why are Python strings immutable?

There are several advantages.

  • One is performance: knowing that a string is immutable means we can allocate space for it at creation time, and the storage requirements are fixed and unchanging. This is also one of the reasons for the distinction between tuples and lists.

  • Another advantage is that strings in Python are considered as “elemental” as numbers. No amount of activity will change the value 8 to anything else, and in Python, no amount of activity will change the string “eight” to anything else.


  1. 固定的内存空间更有效率

  2. 就像没有人会改变数值8的写法一样,字符串“eight”也不需要改变。