Skip to main content
edit to highlight an error on my part
Source Link
user985366
  • 1.8k
  • 10
  • 13

Other 2 (edit: mythis suggestion is not valid, we do need the index for the output. )

Other 2 (edit: my suggestion is not valid, we do need the index for the output)

Other 2 (edit: this suggestion is not valid, we do need the index for the output. )

edit to highlight an error on my part
Source Link
user985366
  • 1.8k
  • 10
  • 13

Other 2Other 2 (edit: my suggestion is not valid, we do need the index for the output)

Other 2

Other 2 (edit: my suggestion is not valid, we do need the index for the output)

fix symbol mistake
Source Link
user985366
  • 1.8k
  • 10
  • 13

All of this can be replaced by just one line output = "*""_" * length since Python allows multiplying a string by a number. (It has to be below the definition of length)

All of this can be replaced by just one line output = "*" * length since Python allows multiplying a string by a number. (It has to be below the definition of length)

All of this can be replaced by just one line output = "_" * length since Python allows multiplying a string by a number. (It has to be below the definition of length)

added another improvement
Source Link
user985366
  • 1.8k
  • 10
  • 13
Loading
Source Link
user985366
  • 1.8k
  • 10
  • 13
Loading