git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]# how to extract a variable as parameter which has index using by a for loop?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

b = [str(i)+str(j)+str(k) for i in range(m) for j in range(m) for k in range(m)] b[21][0:1]+b[21][1:2] b[21][1:2]+b[21][2:3] b[21][0:1]+b[21][2:3] originally, mmm = 5 H2 = [MM[mmm][b[i][0:1]+b[i][1:2]] for i in range(len(b))] how to extract b[i][0:1] and b[i][1:2] as parameters? def node(mmm, b[i][0:1], b[i][1:2]): H2 = [MM[mmm][A+B] for i in range(len(b))] return H2 node(5, b[i][0:1], b[i][1:2])

- Prev by Date:
**Possible PEP - two dimensional arrays?** - Next by Date:
**I'm wrong or Will we fix the ducks limp?** - Previous by thread:
**Creating A Pythonic API Binding** - Next by thread:
**how to extract a variable as parameter which has index using by a for loop?** - Index(es):