方法一:使用列表推导式
>>> vec = [[1,2,3],[4,5,6],[7,8,9]]
>>> get = [num for elem in vec for num in elem]
>>> get
[1, 2, 3, 4, 5, 6, 7, 8, 9]
方法相当于
>>> vec = [[1,2,3],[4,5,6],[7,8,9]]
>>> result = []
>>>
Mega65
Mega65的实用程序和样本
平铺机
python脚本将图像转换为图块,颜色和地图数据。
需要进行安装。
将检测x&y翻转的图块并删除重复的图块。
python tools\tilemizers.py
options
-b4 set output to 4bpp 16 color mode
-b8 set output to 8bpp 256 color mode
-m=ffffff set memory address tiles will be in m