-1

How to check if the input string is same as requirement struct?
Struct: Number,Number Letter Number, Number
For example:

if input is '12,9b7,23'
return True

if input is '1b' 
return faluse
de_jayce
  • 17
  • 4
  • Try regex. https://docs.python.org/3.8/library/re.html – Underoos Apr 20 '20 at 10:57
  • 1
    this is not even a syntactically correct `if` statement. You might want to do some tutorials: [if-statements](https://docs.python.org/3/tutorial/controlflow.html#if-statements) and then read about the differences between `is` and `==` [double-equals-vs-is-in-python](https://stackoverflow.com/questions/15008380/double-equals-vs-is-in-python) – Patrick Artner Apr 20 '20 at 10:58

1 Answers1

0

https://docs.python.org/3.8/library/re.html this sovled

\d{0,9},\d{0,9}[adc]\d{0,9},\d{0,9}
de_jayce
  • 17
  • 4