def numberplatereader(plate):
import re
if re.match("[A-Z]{2}[0-9]{2}\s[A-Z]{3}", plate) != None:
return True
else:
return False
Test.assert_equals(numberplatereader("KU63 NZZ"), True)
Test.assert_equals(numberplatereader("AB12 CDE"),True)
Test.assert_equals(numberplatereader("KU63 NZZ"), True)
Test.assert_equals(numberplatereader("12"),False)
Test.assert_equals(numberplatereader(""), False)
Test.assert_equals(numberplatereader("AB12 C0E"),False)
Test.assert_equals(numberplatereader("BDS 1"), False)
Test.assert_equals(numberplatereader("CBS 0"),False)
Test.assert_equals(numberplatereader("KV35 ZHE"), True)
Test.assert_equals(numberplatereader("BB12 BB8"),False)