python中%代表什么意思?

    技术2022-07-10  116

    python中%: 1. 求模运算,相当于mod,也就是计算除法的余数,比如5%2就得到1。 2. %还用在python的格式化输出,比如:      a = 'test'      print 'it is a %s' %(a)      打印的结果就是 it is a test  

    Processed: 0.014, SQL: 9