Skip to content Skip to sidebar Skip to footer

How Can I Subtract A Method Value From Another Method Value In Python?

I've being trying to subtract a method value from another method value but it gives me a an error even when I use variables. from tkinter import * statistics = Tk() screenwidth = s

Solution 1:

You're trying to subtract two functions. You want to subtract the results of calling the functions. Try this:

from Tkinter import *
statistics = Tk()
screenwidth = statistics.winfo_screenwidth()
windowwidth = statistics.winfo_width()
distance = screenwidth - windowwidth
statistics.geometry('+%s+0' % distance)

Post a Comment for "How Can I Subtract A Method Value From Another Method Value In Python?"