print result in forloop
minimize line of code