P5.
>>> import sys>>> sys.version‘2.7.6 (default, Jun 22 2015, 17:58:13) \n[GCC 4.8.2]‘>>> def f(a,b=1,c=2): print a,b,c >>> apply(f,(1,),{‘b‘:1,‘c‘:2})1 1 2>>> a=1>>> `a`‘1‘>>> repr(a)‘1‘>>> 1<>2True>>> 1!=2True>>> d=dict([(‘a‘,1),])>>> d.has_key(‘a‘)True>>> ‘a‘ in dTrue>>> xrange(10)xrange(10)>>> file<type ‘file‘>>>> #execfile(name)>>> #exec(open(file).read())>>> #exec open(file).read()>>>>>> import sys>>> print>>sys.stdout,‘hello‘hello>>>
时间: 2024-10-10 17:24:59