First time here? Check out the FAQ!

Revision history  [back]

I'm a little confused. I just wrote this little code snippet:

for x in range(2, 13): print(x);

It's correct except for the semicolon I placed in the second line.

Wingware Pro showed no warning, nothing wrong at all.

It even printed the numbers 2 through 12.

Wouldn't placing a semicolon at the end of a line be a sytax error?

Oh...I just found out that Python does allow semicolons but they do nothing I guess.

I'm a little confused. I just wrote this little code snippet:

for x in range(2, 13): print(x);

It's correct except for the semicolon I placed in the second line.

Wingware Pro showed no warning, nothing wrong at all.

It even printed the numbers 2 through 12.

Wouldn't placing a semicolon at the end of a line be a sytax error?

Oh...I just found out that Python does allow semicolons but they do nothing I guess.

I'm a little confused. I just wrote this little code snippet:

for x in range(2, 13): print(x);

It's correct except for the semicolon I placed in the second line.

Wingware Pro showed no warning, nothing wrong at all.

It even printed the numbers 2 through 12.

Wouldn't placing a semicolon at the end of a line be a sytax error?