spacing
eliminated unnecessary (ying|yang)_hold variables
replaced ying/yang with s/t
replaced inlined len()s with saved variable
removed digit-specific logic