Some useful grammars in Python
Input
1 | a,b=input().split() |
List


List slice:

Copy:

Tuple
Elements in tuples cannot be altered,while it could be switched into list to do so.
Inner functions are mostly the same between the two data structures.

String


Judge functions(Inner):

Transformer:

查找类方法:

From string to list:


当t转换为list类型之后,可以利用str.join(t)将序列的每个元素用str连接起来
Format格式化

同时也可以先用实际意义的变量名作为占位符,随后format实际上是一个后赋值的操作
