(s: str = "", width=50, char="*")
| 259 | |
| 260 | |
| 261 | def prompt(s: str = "", width=50, char="*") -> str: |
| 262 | if not s: |
| 263 | return "\n" + width * char |
| 264 | left, extra = divmod(width - len(s) - 2, 2) |
| 265 | return f"{left * char} {s} {(left + extra) * char}" |
| 266 | |
| 267 | |
| 268 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected