
Instead of choosing which Python function to run with if/elif/else, use a dispatch table — a dict with functions as values:
from operator import add, sub, mul
ops = {'+':add, '-':sub, '*':mul}
s = input('Enter +, -, or * : ')
r = ops[s](10, 20)
print(f'10 {s} 20 = {r}')
