郑毅 hace 4 meses
padre
commit
f3fc8b7fe9
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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 = '15555555555'
+    str = '18888888888'
     n = len(str)
-    new_str = 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) == 1 else str[0:int(n/3)] +re.sub(r'.', '*', str[int(n/3):int(n*2/3)]) + str[int(n*2/3):]
     print(new_str)