你可以使用
%
签名
%符号后面跟着一个指向数据类型的字符。如果是整数,则使用d。
%s -> String
$d -> Int
%f -> Float
savings = int(input("How much money do you have in your savings: "))
deposits = int(input("How much money do you put in deposits: "))
savings = "$%d" % savings
deposits = "$%d" % deposits