python 之路N01'
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                python 之路N01'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                1、注釋:
單行注釋:#
多行注釋:‘’‘? ‘’’
2、變量的定義:
- 變量名只能是字母、數字、下劃線組合
 - 第一個字符不能是數字
 - 關鍵字不能聲明為變量(and,as,assert,break,class,contine,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,not,or,pass,print,raise,return,try,while,with,yield)? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
 
3、info='''
? ? -----info of {_name}-------
Name={_name}
Age={_age}
'''.format(_name=name,_age=age)
?
info='''
? ? -----info of {0}-------
Name={0}
Age={1}
'''.format(name,age)
4、getpass:隱藏輸入
import getpass
password=getpass.getpass('password:')
5、while 、for循環
while True:
else:
for i in range(10)
else:
for i in range(0,10,2):從0到10 ,步長為2,默認是1
6、continue:跳出本次循環進入下一個循環
? ? ?break:結束循環
? ??2018-08-28
轉載于:https://www.cnblogs.com/cm920/p/9549899.html
總結
以上是生活随笔為你收集整理的python 之路N01'的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: IDEA工具实现反编译操作
 - 下一篇: Codeforces 1028C(面积并