Do you mean you need a program that can accept inputs in the style of your example and correctly determine the value?
I would separate the string on the mathmatical operators (+,-,x, /) and bracket, then use the BODMAS rule to figure out the order for which the operations take place.
But your question is unclear. Am I on the right track?

It is a matter of operator precidence. Multiplication and division are of equal precidence, as are addition and subtraction. Multiplication and division have higher precidence than addition or subtraction. Therefore, you must put the desired expressions inside parentheses. IE: (2*5/6+3-8*3/2) would be likely equivalent to ((2*5)/6)+3-((8*3)/2). Is this your intention? Other possibilities could be (2*(5/6))+((3-8)*(3/2)). There are other permutations that could be applied, and in most cases the results are very different.

Hello friends, I'm trying to remove all tags from a Wikipedia entry, leaving a simple text file. I have downloaded an HTML file from Wikipedia and hunted through my ...

import tkinter
root = tkinter.Tk()
root.geometry("200x200")
buttons=[i for i in range(10)]
def getNext():
#If specific button is pressed, output "YES"
for num in buttons:
btn=tkinter.Button(root, text=num,command=getNext)
btn.pack(side=tkinter.TOP)