1、宏定义 #define:写法为#define 标识符(形参) 字符串,作用是定义标识符为字符串。 #if、#else、#endif、#elif:和去掉#意思差不多,只是最后一定要加#endif #ifdef:如果后面的宏定义了,那么编译 #ifndef:如果后面的宏没有定义,那么编译 #unde ...
分类:
其他好文 时间:
2020-05-26 01:20:06
阅读次数:
100
#!/bin/bash for item in * do if [ -f $item ] then echo $item fi done for do done if then (elif...then...) (else) fi ...
分类:
其他好文 时间:
2020-05-25 00:19:28
阅读次数:
49
了不起的分支和循环!! 选择 if elif elif else python 可以有效的防止else悬挂问题 条件表达式 small = x if x < y else y == if x < y: small = x else : small = y 断言 assert 用于插入检查点特别有用 ...
分类:
其他好文 时间:
2020-05-24 16:25:51
阅读次数:
53
if 判断语句 if 条件: print(满足条件展示信息) if else判断 if 条件: print(满足条件展示信息) else: print(不满足条件时展示信息) print(程序结束) if elif else 判断 (连续判断) if 条件1: print() elif 条件2: p ...
分类:
编程语言 时间:
2020-05-24 09:50:43
阅读次数:
91
if语句 注意:当把then和 if 或 elif 写到一行的时候,要加分号隔开 在命令行中的写法: test命令详解:https://www.runoob.com/linux/linux-shell-test.html for循环 在终端的写法: while循环 当 until循环 直到 case ...
分类:
系统相关 时间:
2020-05-23 20:45:14
阅读次数:
79
1.读取 2.数据预处理 # 词性还原def get_wordnet_pos(treebank_tag): if treebank_tag.startswith('J'): return nltk.corpus.wordnet.ADJ elif treebank_tag.startswith('V' ...
分类:
其他好文 时间:
2020-05-23 20:31:50
阅读次数:
70
1.读取 2.数据预处理 # 词性还原def get_wordnet_pos(treebank_tag): if treebank_tag.startswith('J'): return nltk.corpus.wordnet.ADJ elif treebank_tag.startswith('V' ...
分类:
其他好文 时间:
2020-05-23 18:50:37
阅读次数:
52
1.语法:if elif else 2.for :for w in words,在编辑同一个集合时,修改该集合可能很难获得正确的结果 所以通常的做法是循环遍历该集合的副本或者是创建新集合。 遍历副本的方法:for user ,starus in users.copy().items(): 创建新集合 ...
分类:
编程语言 时间:
2020-05-20 12:49:32
阅读次数:
61
if 条件 : saf0 else: saf1 if xxx : if xxx: xxxx else: xxxx else: xxxx if xxxx : xxxx elif xxxx: #elif是else if xxxx else: xxxx if userName== 'root' and p ...
分类:
其他好文 时间:
2020-05-18 22:45:24
阅读次数:
67
if else 格式 {% if 条件 %} <标签>语句</标签> {%else%} <标签>语句</标签> {%endif} 标签都可以添加样式 {% for stu in students %} {% if forloop.first %} <li style="color: chartreu ...
分类:
其他好文 时间:
2020-05-14 13:11:20
阅读次数:
63