Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
Ran this script both on the latest version of Python and on Python 2.7.6. For some reason, there's an indent at print(data) that I saw just now. I use TextWrangler - got any tips to help see and fix problems like this?
Code:
#!/usr/bin/pythonw
loop = 0
data = {}
while loop == 0:
	theInput = input("Please type in either data or a command.")
	if isinstance(theInput,int):
	    binInput = bin(theInput)
	    data.add(theInput)
		print(data)
 
The code under the while has 8 spaces instead of 4.

Edit: also, the last line is indented for no reason.
 
menu: View > Text Display > Show Invisibles

menu: View > Text Display > Show Spaces


Many programming editors have similar features.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.