def f(mode): if mode == "i": return 1 elif mode == "f": return 1.0 elif mode == "s": return "" elif mode == "b": return True "{}{}".format(f("i")) "{}{}".format(f("f")) "{}{}".format(f("s")) "{}{}".format(f("b"))