split.py 238 B

12345678
  1. import time
  2. print('[{}] Hello world!'.format(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))))
  3. str = '188888'
  4. n = len(str)
  5. new_str = '****' if len(str) <= 4 else str[0:int(n/3)] + '****' + str[int(n*2/3):]
  6. print(new_str)