import operator
ACTIONS = [operator.add,
operator.sub,
operator.mul,
operator.floordiv,
operator.mod]
def main():
action = int(input())
a, b = map(int, input().split())
print(ACTIONS[action - 1](a, b))
main()
ЗЫ: грех не помочь землячке :)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import operator
ACTIONS = [operator.add,
operator.sub,
operator.mul,
operator.floordiv,
operator.mod]
def main():
action = int(input())
a, b = map(int, input().split())
print(ACTIONS[action - 1](a, b))
main()
ЗЫ: грех не помочь землячке :)