PaladinWhite
Member
Is there any way to get print() to include whitespace? Specifically, what I'm trying to do is indent output by including leading whitespace, but including internal whitespace would be a nice bonus.
print() strips all leading whitespace.
What I expected was (some variation on) this:
What I get is this:
print() also reduces internal whitespace to one space per instance.
What I expected was this:
What I get is this:
Is there a different function I could be using? I couldn't find anything on the wiki.
print() strips all leading whitespace.
What I expected was (some variation on) this:
Code:
print(" word");
word
print("\tword");
word
Code:
print(" word");
word
print("\tword");
word
print() also reduces internal whitespace to one space per instance.
What I expected was this:
Code:
print("word1 word2");
word1 word2
print("word1\tword2");
word1 word2
Code:
print("word1 word2");
word1 word2
print("word1\tword2");
word1 word2
Is there a different function I could be using? I couldn't find anything on the wiki.