Why is it that you need a print() at the end to create the table for example 1:

Example 1 ---

>>> for row in range(10):
    for column in range(10):
        print("*",end=" ")
 
    # Print a blank line for next row
    print()

    
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 
* * * * * * * * * * 

but not for Example 2 ---

for row in range(10):
    print("*",end=" ")

* * * * * * * * * *

When I try to do example 1 without the print() statement at the end, I get this 
error :

for row in range(10):
    for column in range(10):
        print("*",end=" ")
        
SyntaxError: inconsistent use of tabs and spaces in indentation
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to