python basis of a built-in function day15

'\ R' carriage return, return to the first line of the current line, but will not wrap to the next line, then if the output, then the contents of the previous one by the Bank will be covered;

'\ N' wrap, wrap to the next line of the current location, but will not return to the first line;

 

# Print () 
# the INPUT ()
# len ()
# of the type ()
# Open ()
# tuple ()
# List ()
# int ()
# BOOL ()
# the SET ()
# dir ()
# the above mentioned id ()
# str ()


# Print (about locals ()) # returns the names of all the local scope
# print (globals ()) # returns the names of all global scope
# global variables
# nonlocal variables

# iterators the Next __ .__ ()
# the Next ( iterator)
# = iterator ITER (available iterations)
# = iterator ITER can iterative __ .__ ()

# Range (10)
# Range (1,11)
# Print ( '__ next__' in the dir (Range (1,11 , 2)))

# the dir view of a variable has a process
# Print (the dir ([]))
# Print (the dir (. 1))

# Help
# Help (STR)

# variable
# Print (Callable (Print))
# a = 1
Print # (Callable (A))
# Print (Callable (Globals))
# DEF FUNC (): Pass
# Print (Callable (FUNC))

Import Time
# T = the __import __ ( 'Time')
# Print (t.time () )

# a method belonging to a data type of the variable, calls to use.
# If a method is not dependent on any data type, and call it directly - built-in functions and custom functions

# f = open ( '1 review. Py ')
# Print (f.writable ())
# Print (f.readable ())

#id
#hash - may be identical to the hash value of hash data during the execution of a program is always constant
# - dictionaries addressing
# Print (hash (12345))
# Print (hash ( 'hsgda you do not want to go, nklgkds'))
# Print (hash (( '1', 'aaa')))
# Print (hash ([]) )

# RET = the INPUT ( 'Tip:')
# Print (RET)

# print ( 'our country is a garden', end = '') # specify the output terminator
# print ( 'our country is a garden', end = '')
# Print (1,2,3,4,5, sep = ' |') # Specifies the separator between the plurality of output values
# F = Open ( 'File', 'W')
# Print ( 'AAAA', F = File)
# f.close ()

# Import Time
# for I in Range (0,101,2):
# the time.sleep (0.1)
# 2 char_num = I //
# per_str = '\ R & lt %%% S:% S \ n-'% (I,' * '* char_num) \
# 100 the else IF I ==' \ R & lt %%% S:% S '% (I,' * '* char_num)
# Print (per_str, End = '', the flush = True)
#progress Bar

# Exec ( 'Print (123)')
# the eval ( 'Print (123)')
# Print (the eval ( '. 1 + 2 + +. 4. 3')) return value #
# print (exec ( '1 + 2 + 3 + 4')) # No return value
# exec and eval can perform a string type of code
# eval returns a value - there is a simple calculation result of
# exec does not return a value - Simple Process Control
# eval only be used in that you know What is to be executed

# code = '' 'for i in range (10):
Print # (I * '*')
# '' '
# Exec (code)

# of code1 =' for I in Range (0,10): Print (I) '
# = compile1 the compile (of code1,' ',' Exec ' )
# Exec (compile1)

# code2 = '. 1 + 2 +. 3 +. 4'
# compile2 = the compile (code2, '', 'the eval')
# Print (the eval (compile2))

# CODE3 = 'name = INPUT ( "Please iNPUT your name: ") '
# compile3 = the compile (CODE3,' ',' SINGLE ')
# Exec (compile3) # display interactive command is executed, prompts
# Print (name)
after # name # perform name variable has the value
# " 'pythoner'"


# Complex - Complex
# REAL: Rational
# irrational number
# imaginary number: the number of illusory
# 5 + 12j === === plural number of composite
# 15J. 6 +

! # Float (decimals finite, infinite decimal) = decimal : limited recurring decimal, infinite decimal, infinite non-repeating decimals
# float
354.123 3.54123 * 10 = # 2 = 35.4123 * 10 **
# F = 1.781326913750135970
# Print (F)

# Print (bin (10))
# Print (OCT (10))
# Print (hex (10))

# Print (ABS (-5))
# Print (ABS (5))

# Print (divmod (7,2)) # departure div mod remainder
# print (divmod (9,5)) # addition to more than

# print (round (3.14159,3 ))
# Print (POW (2,3)) ** 2 #pow exponentiation. 3 ==
# Print (POW (3,2-))
after # print (pow (2,3,3)) # exponentiation then take I
# Print (POW (3,2,1))

# RET = SUM ([1,2,3,4,5,6])
# Print (RET)

# RET = SUM ([1,2,3,4 , 5,6,10],)
# Print (RET)

# Print (min ([1,2,3,4]))
# Print (min (1,2,3,4))
# Print (min (. 1 , 2,3, -4))
# Print (min (l, 2,3, -4, Key = ABS))

Print (max ([1,2,3,4]))
print(max(1,2,3,4))
print(max(1,2,3,-4))
print(max(1,2,3,-4,key = abs))

Guess you like

Origin www.cnblogs.com/wang-tan/p/11073570.html