在這里所作的是將所有的 Python 符號和關鍵字列出來,這些都是值得掌握的重點。 關鍵字 and del from not while as elif global or with assert else if pass yield break except import print class exec in raise continue finally is return def for lambda try 數據類型 True False None strings numbers floats lists 字符串轉義序列(Escape Sequences) \\ \' \" \a \b \f \n \r \t \v 字符串格式化(String Formats) %d -------》 數字 %i %o %u %x %X %e %E %f --------》 小數 %F %g %G %c %r ----------》%r 調用 rper函數打印字符串,repr函數返回的字符串是加上了轉義序列,是直接書寫的字符串的形式 %s ----------》%s 調用 str函數打印字符串,str函數返回原始字符串 %% 操作符號 + - * ** / // % < > <= >= == != <> ( ) [ ] { } @ , : . = ; += -= *= /= //= %= **=