def isValidMCAddr(ip):
 FirstOct = ((atol(ip) >> 24) & 255)
 return ((FirstOct >= 224) and (FirstOct <= 239))

def isValidMCAddr ( ip ) : FirstOct = ( ( atol ( ip ) >> 24 ) & 255 ) return ( ( FirstOct >= 224 ) and ( FirstOct <= 239 ) )
convert dotted quad string to long and check the first octet .