I’m new in python and sure this is an easy question.
I need to create a serie of numbers in a string to add to faces array. For example, if I have 6 faces, I want generate a string with (0,1,2,3,4,5)
I have made this code snippet to test the idea:faces = [(1,1,1),(2,2,2)]
faces.extend([(3,3,3)])
print(faces) —> [(1,1,1),(2,2,2),(3,3,3)]
falpha = “(4,4,4)”
faces.extend(falpha)
print(faces) —> [(1,1,1),(2,2,2),(3,3,3),(‘4’,‘4’,‘4’)]
The problem is that the values (‘4’,‘4’,‘4’) are strings, so the values cannot be used to create faces.
How can I generate the list of faces dinamically but using ints or convert falpha to ints to extend faces[]?
Thanks!