Ai
1 Star 2 Fork 4

peiss/ant-python-exercises-100p

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
p087.py 329 Bytes
一键复制 编辑 原始数据 按行查看 历史
crazyant 提交于 2022-05-21 11:28 +08:00 . 'xx'
import re
def date_is_right(date):
return re.match(r"\d{4}-\d{2}-\d{2}", date) is not None
print("2021-05-20", date_is_right("2021-05-20"))
print("202-05-20", date_is_right("202-05-20"))
print("2021/05-20", date_is_right("2021/05-20"))
print("20210520", date_is_right("20210520"))
print("20a10520", date_is_right("20a10520"))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/antpython/ant-python-exercises-100p.git
git@gitee.com:antpython/ant-python-exercises-100p.git
antpython
ant-python-exercises-100p
ant-python-exercises-100p
master

搜索帮助