python
常见错误:
' '.join(list): it need to guarantee the element of list is string, so it it better it strlist = ''.join(str(v) for v in list)
str.split(" ") just split a string using a " " , str.split() will split the string using continuous space equal to re.split("\s+",str)
dict mp={} mp.has_key(str) judge whether the key is in mp? mp.clear()
list and tuple can be convented list(tuple) tuple(list)
pig and python
bag list(list or tuple)
tuple list or tuple
map dict

浙公网安备 33010602011771号