new Date(year, month, 0).getDate() 通过 Date 构造函数传入年份.月份.零,然后通过调用获取日期函数即可获取当前月份有多少天 new Date(2019, 2, 0).getDate() new Date(2019, 3, 0).getDate() 我的GitHub…
#coding=utf- def getbin(a): out = "" # 辗转相除法 ): div = a mod = a % out += str(mod) ): break a = div ] print(getbin()) 输出 参考: https://www.nuoweb.com/scripts/3158.html https://jingyan.baidu.com/article/f0e83a255ca20422e59101f5.html…
python中判断某一个元素是否在一个列表中,可以使用关键字in 和 not in. 示例如下: 如果需要输出相应的信息,可以搭配使用if语句,这里不赘述. ------------------------------------------------------------------------------------------分割线------------------------------------------------------------------------------…