我想知道是否有可能在python中对第n个块进行子索引。可以
import UIKit
class ProductCellVC: UICollectionViewCell
{
@IBOutlet weak var productImage: UIImageView!
override func awakeFromNib()
{
super.awakeFromNib()
self.layer.borderWidth = 1
self.layer.cornerRadius = 25
}
}
给出第二个值
to have one row of products,and the width of each cell (product) in the
但是如果我想要类似的东西怎么办?
a = [1,2,3,4,5,6,7,8]
a[::2]
所以基本上每个长度为2的第二个块都可以通过某种方式建立子索引吗?