__main__.py 337 B

123456789101112131415
  1. import re
  2. import time
  3. def main():
  4. # print('[{}] Hello world!'.format(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))))
  5. str = '188888'
  6. n = len(str)
  7. new_str = '****' if len(str) <= 4 else str[0:int(n/3)] + '****' + str[int(n*2/3):]
  8. print(new_str)
  9. # 程序入口
  10. if __name__ == '__main__':
  11. main()