mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
9 lines
225 B
Python
9 lines
225 B
Python
|
from typing import Union
|
||
|
|
||
|
|
||
|
def mask_number(number: int) -> Union[int, str]:
|
||
|
if 100000000 <= number < 1000000000:
|
||
|
number_str = str(number)
|
||
|
return f"{number_str[0:2]}****{number_str[6:9]}"
|
||
|
return number
|