郑毅 6 mesi fa
parent
commit
eefa699b17
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      __main__.py

+ 2 - 2
__main__.py

@@ -4,9 +4,9 @@ import time
 
 def main():
     # print('[{}] Hello world!'.format(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))))
-    str = '18888888888'
+    str = '188888'
     n = len(str)
-    new_str = '*' if len(str) == 1 else str[0:int(n/3)] +re.sub(r'.', '*', str[int(n/3):int(n*2/3)]) + str[int(n*2/3):]
+    new_str = '****' if len(str) <= 4 else str[0:int(n/3)] + '****' + str[int(n*2/3):]
     print(new_str)