This is an interesting question; the solution may not be simple. For my curiosity, I searched internet and found this reference, in case you need to know the math: http://www.movable-type.co.uk/scripts/latlong-gridref.html See Annex C of their Guide to coordinate systems in Great Britan. Then click the link for "The guid is available in a PDF format".
I have previously written BNG tools in VB6 and then C# which apply (encode) the bigram to the normal easting and northing provided by ArcMap when in BNG. I also have written code that decodes the bigram back to numeric easting and northing. While what you want is probably python, I am more than happy to provide the C#, although I am not a programmer and the code is taken as is.