Print vector from left to right in terminal

Hello everyone. I’m new programming in processing. py. I was looking for ways of printing vectors in terminal, I know that in Java mode I can make the following:

int vector[] = { 1, 2, 3, 4 };
void setup()
{
  size(50,50);
  for(int i=0; i<4;i++)
  {
    print(vector[i]);
  }
}
void draw(){}

It’ll return on terminal (Java mode):

1234

But in .py mode it returns

def setup():
    size(200,200)
    vector = [1, 2, 3, 4]

    for i in range(len(vector)):
        print vector[i]
    
def draw():
    background(255)

1
2
3
4

I need in .py mode to print like java mode

Thanks in advance

Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#print-byte-

myList = [ 1, 2, 3, 4 ]
for item in myList: this.print(item) # 1234
exit()
2 Likes

also, maybe:

from __future__ import print_function  # must be first code in sketch

myList = [ 1, 2, 3, 4 ]
for item in myList:
    print(item, end="")
1 Like