I have to pass this Java code to Python but I really do not know what it does:
String row = (String) sprite[i];
We have that sprite is a vector and this is in a cycle for
, so my variable i
is the one that will be increasing.
I have to pass this Java code to Python but I really do not know what it does:
String row = (String) sprite[i];
We have that sprite is a vector and this is in a cycle for
, so my variable i
is the one that will be increasing.
It means that the variable row
is getting the value i
of vector sprite
and that this value was converted to String
.
Example:
int i = 0;
int sprite = [1,2,4];
// es igual a 1 pero con tipo String
String row = (String)sprite[i];
And it can be translated to python with:
row = str(sprite[i])