python - 将变量的值存储在 menory 或 ram 中
问题描述
如何在 ram 中存储特定时间的分钟并在应用程序再次运行时重用它。就像在电脑关闭时也要存储它,它必须将其保存在货币或内存中或保存价值存储的某个地方
import time
import sys
store_time = time.strftime("%M") // this is the current minutes
time_val = 2 // this is the max hour of used
store_value = store_time /60
if store_value == time_val:
print('you reach the max of use of the app')
exit()
解决方案
推荐阅读
- api - 如何在 Leaflet 中更改请求 Tile URL?
- objective-c - 如何在文件中追加数组
- c# - ASP.NET Core 3.1 路由(Route、ActionName)本地化怎么做?
- java - 等到线程结束
- c# - 串行连接不同步。Arduino 和 C# 连接
- optimization - Kubernetes - 减少 pod 的好处
- pdo - PDO 的 fetch 方法将错误的参数传递给构造函数类(在 Yii 中)
- c# - xamarin表单签名包失败android
- php - 来自漂亮 URL 的 Laravel 过滤器
- python - 如何正确替换数据框列中的相似值?