0

I have a variable x, which has a string of 500 and more charhacters.

The problem is, it is very annoying when you do coding and this long string takes half of the screen.

My question is: is it possible to hide the value of variable, with out manipulating it's value? Open for any solution to solve problem. Thank you.

filtertips
  • 801
  • 3
  • 12
  • 25
  • Do you mean in your code editing program? You could store the string in a different file and import it if you really want to but this seems like a specific task for an IDE. – Tadhg McDonald-Jensen May 29 '16 at 17:26
  • yes, in my code editing program. i've been thinking about this idea, was just wondering if there is anything more pythonic about it:) – filtertips May 29 '16 at 18:05
  • I don't think having crazy long strings hard coded into your program is very pythonesque to begin with, are they for pretty output of a terminal application? – Tadhg McDonald-Jensen May 29 '16 at 18:17

1 Answers1

0

Its a little backwards of a solution but you can call X in a separate program and import it to your main program.

Importing variables from another file?

Here is a link to how to do that. Another solution would be to call it at the top of your program and just type everything below it.

Community
  • 1
  • 1
Sam
  • 293
  • 3
  • 19