# print(abs(-1)) #取绝对值
##all() 对序列中的每一个元素进行布尔运算,如果全部是True 那么返回True ,有一个是FALSE那么返回false
##特殊:当序列中没有可以迭代的对象时为True
# print(all([1,2,0]))
# print(all(['']))
##转换成2进制###
# print(bin(100))
# print(bin(10)) #10转2
# print(oct(10)) #10转8
# print(hex(10)) #10转16
#
# ####bool 判断布尔值
# print(bool(''))
# print(bool(0))
# print(bool(None))
####bytes 函数
# name = '覃世广'
# print(bytes(name,encoding='utf-8'))
# print(bytes(name,encoding='utf-8').decode('utf-8'))
# print(bytes(name,encoding='gbk'))
# print(bytes(name,encoding='gbk').decode('gbk'))
#
# print(bytes(name,encoding='ASCII')) ##ASCII不能编码中文
########chr 转换ascii码
# print(chr(100)) ##d
# print(chr(97)) ##a
######dir 打印某一个对象里面都有哪些属性##
# print(dir())
#####divmod() 分块分页 除法,得商和余数
# print(divmod(10,3)) ##(3, 1)
##eval
# dict1 = {'name':'qsg' }
# dict_str = str(dict1)
# print(dict_str)
# eval(dict_str)
# print(eval(dict_str)['name']) ####qsg eval 能把字符串分离出来
# express = '1+2+3+4*2*0.5' ####eval 能够使字符串中的数字运算###
# print(eval(express))
###hash
# name = 'qsggg'
# print(hash(name))
# print(hash(name))
# name = 'lhqqq'
# print(hash(name))
# print(hash(name))
####isinstance() #####函数
# print(isinstance(1,int))
# print(isinstance('abc',str))
# print(isinstance([1,2,3],list))
# print(isinstance((1,2,'3'),tuple))
# print(isinstance({1:2},tuple))
# print(isinstance({1,2,3},set))
# print(globals()) ###全局变量
# print(locals()) ###局部变量
# name = 'hfoiweshfoiwefhowefhwefhfkashfikweshgleahgeikshg'
# def test():
# age = '21312412415425253563322222222222222222222'
# print(globals())
# print(locals())
# test()
# print(__file__) ##文件路径
#
# li = [1,213123,-9999,10000]
# print(max(li))
# print(min(li))
# ####zip 拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链拉链
#
# print(list(zip(('a','b','c','d'),(1,2,3))))
#
#
# p = {'name':'qsg','age':18,'gender':'lhq'}
# print(list(zip(p.keys(),p.values()))) #######字典转换成元组的形式!!!
#
# print(list(zip(['a','b'],'123456')))
###max(ite,lambda )
# people = [
# {'name':'qsg','age':100},
# {'name':'lhq','age':11111},
# {'name':'nerioner','age':100000},
# {'name':'bilio','age':9999},
# {'name':'ferer','age':9999}
# ]
# print('覃世广',max(people,key=lambda dic:dic['age']))
# print('覃世广',min(people,key=lambda dic:dic['age']))
###chr() 与 ord() 函数的作用的相反的
# print(chr(97))
# print(ord('a'))
### pow() 函数
# print(pow(3,3,2)) #相当于(3**3)%2
#########################sorted() 排序函数
# people = [
# {'name':'qsg','age':100},
# {'name':'lhq','age':11111},
# {'name':'nerioner','age':100000},
# {'name':'bilio','age':9999},
# {'name':'ferer','age':9999}
# ]
# print(sorted(people,key=lambda dic:dic['age']))
# l=[1,2,3,4]
# print(list(reversed(l)))
# print(l)
#
# print(round(3.5))
# print(set('hello'))
# l='hello'
# s1=slice(3,5)
# s2=slice(1,4,2)
# # print(l[3:5])
# print(l[s1])
# print(l[s2])
# print(s2.start)
# print(s2.stop)
# print(s2.step)
# l = [1,2,3,4]
# print(sum(l))
# print(sum(range(5)))
##type
# s = '123'
# if type(s) is str:
# n = int(s)
# res = n+1
# print(res)
#------------<import __import__()------>------#
# import qaz
# qaz.qsg_lhq()
# module_name = 'qaz'
# m=__import__(module_name)
# m.qsg_lhq()