code: def dec2bin(s):
      
      if not isinstance(s, int):
          num = int(s)
      else:
          num = s
      mid = []
      while True:
          if num == 0:
              break
          num, rem = divmod(num, 2)
          mid.append(base[rem])
  
      return ''.join([str(x) for x in mid[::-1]])
docs: dec2bin
      十进制 to 二进制: bin()
      :param s:
      :return: