Samuel Jakubec
Samuel Jakubec

Reputation: 9

Annoying blank line in Idle shell

I noticed that when i run my program the IDLE shell writes a blank line in between my prints. I am adding a screenshot so you guys know what exactly i think. The blank line is not written in my program, it just happens automatically, is there any way to turn off these blank lines?

blank lines

Upvotes: 0

Views: 237

Answers (1)

Brandon Bolton
Brandon Bolton

Reputation: 11

It looks like you’re getting a new line added after the print. Try adding a .rstrip() to the variable inside print. Without seeing the input code, it may be hard to determine what is going on. This would be my guess though. Something like this should work:

print(test.rstrip())

Upvotes: 1

Related Questions