标签: python python-3.x
如何检查输入字符串是否与需求结构相同? 结构:Number,Number Letter Number, Number 例如:
Number,Number Letter Number, Number
if input is '12,9b7,23' return True if input is '1b' return faluse
答案 0 :(得分:0)
https://docs.python.org/3.8/library/re.html已解决
\d{0,9},\d{0,9}[adc]\d{0,9},\d{0,9}