• + 0 comments

    For the record, the extra space comes from the comma. Use string concatenation instead:

    print((space*noOfSpaces)+(n-noOfSpaces)*"#")