1

I was asked to create something in Python during an interview:

I made a checklist helper, it has very long strings that don't fit the screen. I use sublime text to write the code and powershell to see if it's working.

It looks like this (not pasting the code here because it's too long, but if needed, I can do it): Sublime text: Powershell:

How can I make these strings fit the screen? The users shouldn't have to do anything except run the tool.

It is not the final thing, code looks messy and it is incomplete.

Liviu Avram
  • 103
  • 10

1 Answers1

1

You can construct long string in Python like this:

 string = ("You can put a"
      "very long string"
      "like this"
     )

This way, you can see long strings on the screen, using some editor.

PRVS
  • 1,612
  • 4
  • 38
  • 75