Timeline for answer to What does end=' ' in a print call exactly do? by starrify
Current License: CC BY-SA 3.0
Post Revisions
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 4, 2013 at 14:54 | vote | accept | Pldx | ||
| Dec 4, 2013 at 14:30 | comment | added | starrify |
@Robᵩ Of course there're many ways to write the code short, however this is not something like IOCCC and the purpose of source code is for people to read. I don't see any benefit to write like that. Also, are you sure you're providing a correct example? You may try n=1.
|
|
| Dec 4, 2013 at 14:15 | comment | added | Robᵩ |
Or, in a single call to print: print( '*' * n + '\n' + ( '*' + ' '*(n-2) + '*\n' )*(n-2) + '*'*n )
|
|
| Dec 4, 2013 at 10:20 | history | answered | starrify | CC BY-SA 3.0 |