Common types of finishing python

 

# A digital 
# int (..) 
# two, string 
# Replace Find the Join Strip startsWith Split Upper Lower the format 
# tempalte = "I AM {name}, Age: Age {}" 
# # V = tempalte.format (name = 'Alex', Age =. 19) 
# V = tempalte.format (** { "name": 'Alex', 'Age':}. 19) 
# Print (V) 
# III lists 
# the append, Extend, INSERT 
# index, slicing, cycle 
# four-tuple 
# ignored 
# index, slicing, and the element can not be modified cycle 
# five Dictionary 
# GET / Update / Keys / values / items 
# for, index 

# DIC = {
#     "k1": 'v1'
# }

# v = "k1" in dic
# print(v)

# v = "v1" in dic.values()
# print(v)
# 六、布尔值
# 0 1
# bool(...)
# None ""  () []  {} 0 ==> False

 

Guess you like

Origin www.cnblogs.com/raitorei/p/11640722.html