当前位置: 首页 > news >正文

Python thread lambda run multiple functions

import datetime 
import uuid
import time
import numpy as np
import threadingdef get_uuid_time():return f"{uuid.uuid4().hex}_{datetime.datetime.now().strftime("%Y%m%d%H%M%S%f")}"def get_time_uuid():return f'{datetime.datetime.now().strftime("%Y%m%d%H%M%S%f")}_{uuid.uuid4().hex}'t1=threading.Thread(target=lambda:[(print(a),print(get_time_uuid()),print(get_uuid_time()),time.sleep(1))for a in range(1001)      
])t1.start()
t1.join()
print(f'Finished in {datetime.datetime.now()}')

 

 

image

 

 

 

 

 

image

 

http://www.rkmt.cn/news/55684.html

相关文章:

  • csp-s 2025 随笔
  • 内网穿透配置和使用 - Rainbow
  • 13. Spring AI 的观测性 - Rainbow
  • Elasticsearch8.4.1升级Elasticsearch9.1.5 - 实践
  • 工具成瘾——黑客为何痴迷工具与AI(及如何开始用脑思考)
  • 完整教程:Flask入门教程——李辉 第5章: 数据库 关键知识梳理
  • SLB及健康检查
  • 2025牛客国庆集训派对day7 M C 个人题解 - 教程
  • C++ 中 struct 与 class 的用法与区别
  • 07.创建型 - 抽象工厂模式(Abstract Factory Pattern)
  • 模型量化原理
  • 日总结 29
  • 2025.11.19 C 题解
  • 2025.11.20
  • 【比赛记录】2025CSP+NOIP 冲刺模拟赛合集Ⅵ
  • 3 分钟上手 SightAI:在你熟悉的工具里直接调用顶级大模型 - sight
  • 2025.11.20博客
  • 芯谷科技--高性能电动工具直流调速电路GS069 - 指南
  • 洛谷 B4411:[GESP202509 二级] 优美的数字 ← 嵌套循环
  • 2025 门窗十大品牌精准选购指南:行业评估报告 + 白皮书护航,选窗不踩坑!
  • 网络流建模
  • 2025 门窗十大品牌权威榜单:依托行业评估报告 + 选购白皮书,省心采购指南!
  • 安卓中执行 root 命令
  • UniApp缓存系统详解 - 详解
  • CF2165 VP 记录
  • 如何在SPM混编中实现不同target之间的通信?
  • 专题:2025构建全自动驾驶汽车生态系统:中国智能驾驶行业全景研究报告|附80+份报告PDF、数据仪表盘汇总下载
  • 2025/11/20-Why brushing teeth twice a day is not always best
  • uos安装idea
  • HDU3586-Information Disturbing