摘要:        
return 语句就是讲结果返回到调用的地方,并把程序的控制权一起返回 程序运行到所遇到的第一个return即返回(退出def块),不会再运行第二个return。 要返回两个数值,写成一行即可: 但是也并不意味着一个函数体中只能有一个return 语句,例如: 函数没有 return,默认 retu    阅读全文
posted @ 2017-12-29 20:11
lincappu
阅读(372672)
评论(3)
推荐(10)
        
            
        
        
摘要:        
1.先用 for 循环取。 12345678910    阅读全文
posted @ 2017-12-29 19:27
lincappu
阅读(8720)
评论(0)
推荐(0)
        
            
        
        
摘要:        
格式:\033[显示方式;前景色;背景色m数值表示的参数含义:显示方式: 0(默认值)、1(高亮)、22(非粗体)、4(下划线)、24(非下划线)、 5(闪烁)、25(非闪烁)、7(反显)、27(非反显)前景色: 30(黑色)、31(红色)、32(绿色)、 33(黄色)、34(蓝色)、35(洋 红)、36(青色)、37(白色)背景色: 40(黑色)、41(红色)、42(绿色)、 43(黄色)、44...    阅读全文
posted @ 2017-12-29 18:02
lincappu
阅读(713)
评论(0)
推荐(0)
        
            
        
        
摘要:        
命令形式: split(str='',number=string.count(str))[n] str 分隔符 number 切分几次,[n] 获取第几个值。 1.如果切分的可迭代对象中包含空元素的解决方法:    阅读全文
posted @ 2017-12-29 17:49
lincappu
阅读(2117)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: staticmethod(function) Return a static method for function. A static method does not receive an implicit first argument. The @staticmethod form     阅读全文
posted @ 2017-12-29 17:00
lincappu
阅读(417)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: classmethod(function) Return a class method for function. A class method receives the class as implicit first argument, just like an instance me    阅读全文
posted @ 2017-12-29 16:58
lincappu
阅读(757)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: class property(fget=None, fset=None, fdel=None, doc=None) Return a property attribute. fget is a function for getting an attribute value. fset i    阅读全文
posted @ 2017-12-29 16:57
lincappu
阅读(327)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: 第一个参数为语句字符串,globals参数和locals参数为可选参数,如果提供,globals参数必需是字典,locals参数为mapping对象。 2.能够读取局部和全部变量,并且能修改全局变量,这个要注意的是,他修改完全局变量的值后,只能在内部使用因为没有 return 的功能,(    阅读全文
posted @ 2017-12-29 16:56
lincappu
阅读(378)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: This function can also be used to execute arbitrary code objects (such as those created by compile()). In this case pass a code object instead o    阅读全文
posted @ 2017-12-29 16:55
lincappu
阅读(407)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)    阅读全文
posted @ 2017-12-29 16:54
lincappu
阅读(798)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) Open file and return a corresponding fil    阅读全文
posted @ 2017-12-29 16:52
lincappu
阅读(286)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: input([prompt]) If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line f    阅读全文
posted @ 2017-12-29 16:50
lincappu
阅读(242)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) Print objects to the text stream file, separated by sep and followed by end. se    阅读全文
posted @ 2017-12-29 16:37
lincappu
阅读(342)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals()when it is called in    阅读全文
posted @ 2017-12-29 16:35
lincappu
阅读(325)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档:    阅读全文
posted @ 2017-12-29 16:34
lincappu
阅读(283)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: callable(object) Return True if the object argument appears callable, False if not. If this returns true, it is still possible that a call fails    阅读全文
posted @ 2017-12-29 16:33
lincappu
阅读(391)
评论(0)
推荐(1)
        
            
        
        
摘要:        
英文文档: setattr(object, name, value) This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may     阅读全文
posted @ 2017-12-29 16:32
lincappu
阅读(327)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: getattr(object, name[, default])Return the value of the named attribute of object. name must be a string. If the string is the name of one of th    阅读全文
posted @ 2017-12-29 16:26
lincappu
阅读(222)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档:    阅读全文
posted @ 2017-12-29 16:25
lincappu
阅读(258)
评论(0)
推荐(0)
        
            
        
        
摘要:        
英文文档: issubclass(class, classinfo)Return true if class is a subclass (direct, indirect or virtual) of classinfo. A class is considered a subclass of i    阅读全文
posted @ 2017-12-29 16:24
lincappu
阅读(1009)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号