, , .
Python:
int , , ,
float ,
str , ,
char 1 ( ),
bool , 1 . False=0 () True= >0 (). .
( , ) Python . Python , ( ). , \n. , . : ( , \n. .)
="""
!"""
print ()
="\n\n!"
print ()
Python
. Python , . Python.
, , , , .
-, . ( , ;)
-, , , . begin end, . C- { }. , , . ! .
If x[i]>max:
max=x[i]
imax=i
, ? .
, .
Python goto, , . Python .
|
|
Python , . Python:
And, as, assert, break, class, continue, def, del, elif, else, except, exec, finally, for, from, global, if, import, in, is, lambda, not, or, pass, print, raise, return, try, while, which, yield
, :
True,False,None, NotImplemented, Ellipsis,__debug__
Python , , , , True , , True. TRUE true .
Python , , , , . , , , .
: Python 2 , Python . .
, , - .
Python # . :
a=b #
- . , , (), ().
:
""" .
. """
class :
''' .
.'''
..........
def :
""" . """
__doc__. Python , __doc__ .
, , float():
print (float.__doc__)
:
float(x) -> floating point number
Convert a string or number to a floating point number, if possible.
float, dir():
print (dir(float))
:
['__abs__', '__add__', '__bool__', '__ cl as s __', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getformat__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__int__', '__le__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__pos__', '__pow__', '__radd__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rmod__', '__rmul__', '__round__', '__rpow__', '__rsub__', '__rtruediv__', '__setattr__', '__setformat__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', 'as_integer_ratio', 'conjugate', ' from hex', 'hex', 'imag', ' is _integer', 'real']
|
|
is _integer, :
print (float. is _integer.__doc__)
:
Return True if the float is an integer.