def dummy(): for i in range(20): num = i * 2.0 #print num, ' the second col ', num**2 print '%d. %40s %-30d' %(123.4566543342, ' the second col', num**2) def strTest(str): str = 'newstr' x = 'test' print x strTest(x) print x # File: hello1.py from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() root.mainloop()