Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Or, in a single call to print: print( '*' * n + '\n' + ( '*' + ' '*(n-2) + '*\n' )*(n-2) + '*'*n ) Commented Dec 4, 2013 at 14:15
  • @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. Commented Dec 4, 2013 at 14:30