Create Binary String In Python Function