当前位置:网站首页>Seasonal change 48 / 90
Seasonal change 48 / 90
2022-04-21 15:38:00 【Programming Capriccio】
Random thoughts on programming
Python list
list=["a","b","c"]
// Traverse the list
for item in list:
print(item)
Python Dictionaries
dic={"Baotou":" Mongolia B","Huhehaote":" Mongolia A"}print(dic["Huhehaote"])
// Ergodic dictionary
for key,value in dic.items():
print(key)
print(value)
Python object-oriented
// Define the object
class Song():
def __init__(self,lyrics):
self.lyrics=lyrics
def sing(self):
print(self.lyrics)
// Instantiation
song = Song("you and me")
song.sing()
Bash set command
1. set -u // If you encounter a variable that doesn't exist, you will report an error , And stop executing .
2. set -x // Used before running the results , First output the line of command executed .
3. set -e // Make the script as long as an error occurs , On termination of execution .
4. set -o pipefail // As long as one subcommand fails , The whole pipeline command fails , The script will terminate execution .
5. set -v // Means to print Shell Every line of input received .
6. set -Eeuxo pipefail //set Parameter combination
7. bash -euxo pipefail script.sh // perform Bash Script time , Pass in these parameters from the command line .
版权声明
本文为[Programming Capriccio]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211536067777.html
边栏推荐
- 从全内存、全本地磁盘缓存、一半缓存,一半OSS的测试结果来看,有什么结论?
- 笔记应用推荐-WorkFlowy
- (计数线段树)lintcode中等248 · 统计比给定整数小的数的个数
- Smart Park Digital financing - Digital enabling operation management platform solution
- 【常见问题】anaconda prompt报错solving environment:failed
- 一级等保怎么做?要收费吗?等保要求是什么?
- ABAQUS loads according to coordinates - analytical field load mapping
- Winter is coming. Let's snow your website
- [Unity] error CS0433: The type ‘Task‘ exists in both Unity.Tasks,....
- Deltix round, summer 2021 D. take a guess
猜你喜欢

AcWing 1788. 牛为什么过马路(模拟)

Obsidian automatically uploads pictures to the drawing bed - install picgo plug-in and configure

LeetCode 203、移除链表元素

许远东受邀上海管理科技论坛做《LTD数字化经营方法论》分享

Obsidian 自动上传图片到图床——安装PicGo插件并配置

LeetCode-232-用栈实现队列

78页数字孪生+智慧楼宇解决方案

AcWing 1812. Square pasture (enumeration)

提取CNN模型中间层输出方法

How should the IT service management framework be implemented? That's enough
随机推荐
华为电力PON配网解决方案
(计数线段树)lintcode中等248 · 统计比给定整数小的数的个数
红队技术-父进程伪装(MITRE ATT&CK框架:T1134)
How to synchronize client email to webmail and how to register email address?
Universal navigation: a concise and practical comprehensive navigation website
Latex common formula query
Embedded development: three skills of reusing development board for testing
Application of food safety law and relevant laws in patent examination
Red team technology - parent process camouflage (mitre att & CK framework: t1134)
What exactly does the distributed core principle analysis that fascinates Alibaba P8? I was surprised after reading it
Jetpack compose uses custom operators to achieve the effect of drawing five pointed stars
季更42/90
商家该如何建立私域流量?
AcWing 1854. Promotion count (Analog)
swap自动套利机器人生态系统开发模式详解
102页新一代数字化转型信息化总体规划方案
返璞归真,多方安全计算要回归到“安全”的本源考虑
Smart Park Digital financing - Digital enabling operation management platform solution
季更48/90
AcWing 1775. 丢失的牛 (模拟)