for i in range(0,10):
print i
** Apparently Python3 and Python2 are a little different ** 2015/06/20 Updated at 9:53 pm
** Python 2 series **
Make a list from mini to max with range (mini, max)
The list is like an array. The for statement is executed for the number in the list. You can make a list from 10 to 1 with range (max, min, -1)
.
** Python3 series **
For Python3 series, list (range (0,10))
may be better. The for statement works, but the explanation of creating a list may not fit.
for(int i = 0;i < 10;i++){
println(i);
}
num1 = 10
num2 = [10,20,30]
#↓ Python2 system that can be used with this
num2 = range(10,30,10)
#↓ For Python 3 series
num2 = list(range(10,30,10))
int num1 = 10;
int[] num2 = {10,20,30}
For the time being, I may update again so far
Recommended Posts