摘要:
判断列表里是否嵌套了其他东西,可以通过循环列表内容来逐个判断列表元素是否是列表。 比如:要修改该列表中所有的2,将2改为0: a=[1,2,3,4,5,6,7,8,[1,2],3,4,5,6,[3,4,4,2,3],3,4,5] def chu2 (a): for i in range(a.coun 阅读全文
摘要:
capitalize(...) | S.capitalize() -> string | #-字符串首字母大写- | Return a copy of the string S with only its first character | capitalized. | | center(...) 阅读全文