fork(3) download
  1. import re
  2. s = ['This sentence is correct.','this sentence does not start with capital','This sentence is not correct']
  3.  
  4. # What I tried so for is:
  5. for i in s:
  6. print(re.match('^[A-Z][\w\s]+[?.!]$', i) is not None)
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
True
False
False