?
?布爾操作,是或者否:
Operation
Result
Notes
| 
                   
                      | 
                
                   if? x ?is false, then? y , else? x  | 
                
                   (1)  | 
              
| 
                   
                      | 
                
                   if? x ?is false, then? x , else? y  | 
                
                   (2)  | 
              
| 
                   
                      | 
                
                   
                    if?
                    
                      x
                    
                    ?is false, then?
                      | 
                
                   (3) ?  | 
              
?
比較操作,大還是小,是否相同對象,是否相同值:
Operation
Meaning
| 
                   
                      | 
                
                   strictly less than  | 
              
| 
                   
                      | 
                
                   less than or equal  | 
              
| 
                   
                      | 
                
                   strictly greater than  | 
              
| 
                   
                      | 
                
                   greater than or equal  | 
              
| 
                   
                      | 
                
                   equal  | 
              
| 
                   
                      | 
                
                   not equal  | 
              
| 
                   
                      | 
                
                   object identity  | 
              
| 
                   
                      | 
                
                   negated object identity ?  | 
              
?
常用數學計算:
Operation
Result
Notes
Full documentation
| 
                   
                      | 
                
                   sum of? x ?and? y  | 
                ? | ? | 
| 
                   
                      | 
                
                   difference of? x ?and? y  | 
                ? | ? | 
| 
                   
                      | 
                
                   product of? x ?and? y  | 
                ? | ? | 
| 
                   
                      | 
                
                   quotient of? x ?and? y  | 
                ? | ? | 
| 
                   
                      | 
                
                   floored quotient of? x ?and? y  | 
                
                   (1)  | 
                ? | 
| 
                   
                      | 
                
                   
                    remainder of?
                      | 
                
                   (2)  | 
                ? | 
| 
                   
                      | 
                
                   x ?negated  | 
                ? | ? | 
| 
                   
                      | 
                
                   x ?unchanged  | 
                ? | ? | 
| 
                   
                      | 
                
                   absolute value or magnitude of? x  | 
                ? | 
                   
                      | 
              
| 
                   
                      | 
                
                   x ?converted to integer  | 
                
                   (3)(6)  | 
                
                   
                      | 
              
| 
                   
                      | 
                
                   x ?converted to floating point  | 
                
                   (4)(6)  | 
                
                   
                      | 
              
| 
                   
                      | 
                
                   a complex number with real part? re , imaginary part? im .? im ?defaults to zero.  | 
                
                   (6)  | 
                
                   
                      | 
              
| 
                   
                      | 
                
                   conjugate of the complex number? c  | 
                ? | ? | 
| 
                   
                      | 
                
                   
                    the pair?
                      | 
                
                   (2)  | 
                
                   
                      | 
              
| 
                   
                      | 
                
                   x ?to the power? y  | 
                
                   (5)  | 
                
                   
                      | 
              
| 
                   
                      | 
                
                   x ?to the power? y  | 
                
                   (5) ?  | 
              
?
字符串常見操作:
Operation
Result
Notes
| 
                   
                      | 
                
                   
                      | 
                
                   (1)  | 
              
| 
                   
                      | 
                
                   
                      | 
                
                   (1)  | 
              
| 
                   
                      | 
                
                   the concatenation of? s ?and? t  | 
                
                   (6)(7)  | 
              
| 
                   
                      | 
                
                   equivalent to adding? s ?to itself? n ?times  | 
                
                   (2)(7)  | 
              
| 
                   
                      | 
                
                   i th item of? s , origin 0  | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   slice of? s ?from? i ?to? j  | 
                
                   (3)(4)  | 
              
| 
                   
                      | 
                
                   slice of? s ?from? i ?to? j ?with step? k  | 
                
                   (3)(5)  | 
              
| 
                   
                      | 
                
                   length of? s  | 
                ? | 
| 
                   
                      | 
                
                   smallest item of? s  | 
                ? | 
| 
                   
                      | 
                
                   largest item of? s  | 
                ? | 
| 
                   
                      | 
                
                   index of the first occurrence of? x ?in? s ?(at or after index? i ?and before index? j )  | 
                
                   (8)  | 
              
| 
                   
                      | 
                
                   total number of occurrences of? x ?in? s ?  | 
              
?
?
數組常見操作:
Operation
Result
Notes
| 
                   
                      | 
                
                   item? i ?of? s ?is replaced by? x  | 
                ? | 
| 
                   
                      | 
                
                   slice of? s ?from? i ?to? j ?is replaced by the contents of the iterable? t  | 
                ? | 
| 
                   
                      | 
                
                   
                    same as?
                      | 
                ? | 
| 
                   
                      | 
                
                   
                    the elements of?
                      | 
                
                   (1)  | 
              
| 
                   
                      | 
                
                   
                    removes the elements of?
                      | 
                ? | 
| 
                   
                      | 
                
                   
                    appends?
                    
                      x
                    
                    ?to the end of the sequence (same as?
                      | 
                ? | 
| 
                   
                      | 
                
                   
                    removes all items from?
                    
                      s
                    
                    ?(same as?
                      | 
                
                   (5)  | 
              
| 
                   
                      | 
                
                   
                    creates a shallow copy of?
                    
                      s
                    
                    ?(same as?
                      | 
                
                   (5)  | 
              
| 
                   
                      | 
                
                   
                    extends?
                    
                      s
                    
                    ?with the contents of?
                    
                      t
                    
                    ?(for the most part the same as
                      | 
                ? | 
| 
                   
                      | 
                
                   updates? s ?with its contents repeated? n ?times  | 
                
                   (6)  | 
              
| 
                   
                      | 
                
                   
                    inserts?
                    
                      x
                    
                    ?into?
                    
                      s
                    
                    ?at the index given by?
                    
                      i
                    
                    (same as?
                      | 
                ? | 
| 
                   
                      | 
                
                   retrieves the item at? i ?and also removes it from? s  | 
                
                   (2)  | 
              
| 
                   
                      | 
                
                   
                    remove the first item from?
                    
                      s
                    
                    ?where?
                      | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   reverses the items of? s ?in place  | 
                
                   (4) ?  | 
              
?
常見格式化占位符:
Conversion
Meaning
Notes
| 
                   
                      | 
                
                   Signed integer decimal.  | 
                ? | 
| 
                   
                      | 
                
                   Signed integer decimal.  | 
                ? | 
| 
                   
                      | 
                
                   Signed octal value.  | 
                
                   (1)  | 
              
| 
                   
                      | 
                
                   
                    Obsolete type – it is identical to?
                      | 
                
                   (6)  | 
              
| 
                   
                      | 
                
                   Signed hexadecimal (lowercase).  | 
                
                   (2)  | 
              
| 
                   
                      | 
                
                   Signed hexadecimal (uppercase).  | 
                
                   (2)  | 
              
| 
                   
                      | 
                
                   Floating point exponential format (lowercase).  | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   Floating point exponential format (uppercase).  | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   Floating point decimal format.  | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   Floating point decimal format.  | 
                
                   (3)  | 
              
| 
                   
                      | 
                
                   Floating point format. Uses lowercase exponential format if exponent is less than -4 or not less than precision, decimal format otherwise.  | 
                
                   (4)  | 
              
| 
                   
                      | 
                
                   Floating point format. Uses uppercase exponential format if exponent is less than -4 or not less than precision, decimal format otherwise.  | 
                
                   (4)  | 
              
| 
                   
                      | 
                
                   Single character (accepts integer or single character string).  | 
                ? | 
| 
                   
                      | 
                
                   
                    String (converts any Python object using?
                      | 
                
                   (5)  | 
              
| 
                   
                      | 
                
                   
                    String (converts any Python object using?
                      | 
                
                   (5)  | 
              
| 
                   
                      | 
                
                   
                    String (converts any Python object using?
                      | 
                
                   (5)  | 
              
| 
                   
                      | 
                
                   
                    No argument is converted, results in a?
                      | 
                ? | 
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061
					微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
					
