#!usr/bin/env python
# -*- coding:utf-8 -*-
import string #导入Sting模块
alphas = string.letters + '_' #预定义
nums = string.digits
print 'Welcome to the Identifier Checker'
print 'Testees must be at least 2 chars long.'
MyInput = raw_input('Identifier to test:')
if len(MyInput) > 1:
if MyInput[0] not in alphas:
print '''invalid:first symbol must be alphabetic'''
else:
for otherChar in MyInput[1:]:
if otherChar not in alphas + nums:
print '''invalid:remaining symbols must be alphanumeric'''
break
print "OK as an identifier"