可以使用Python的time模块和random模块来生成类似于Timestamp的随机字符串:

import time
import random

def random_timestamp():
    # 生成当前时间戳
    timestamp = int(time.time() * 1000)
    # 加上一个随机数
    timestamp += random.randint(1, 1000)
    # 转换为字符串
    timestamp_str = str(timestamp)
    return timestamp_str

这个函数生成一个当前时间戳加上一个1-1000之间的随机数的字符串。可以根据需要调整加上的随机数的范围。

python随机生成一个Timestamp类似的字符串

原文地址: https://www.cveoy.top/t/topic/dxeJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录