python内置函数的模仿

# mymin(1,2,3)
# def mymin(a,b,c):
#     print(a)
#     print(b)
#     print(c)


# # s1=[1,2,34]
# s2=[32]
# s3=[343,43]
# d={'c':123,'b':234}
# d1={'c':123}

# mymin(**d,a=12)
# mymin(*s3,c=12)
# mymin(12,*s3)
# mymin(a=12,**d)
# mymin(12,**d)
# mymin(12,*s3)
# mymin(12,*s2,c=12)
# mymin(12,*s2,**d1)




# s2=[32]
# s3=[343,43]
# d={'c':123,'b':234}
# d1={'c':123}
# def getminmax(a,b,c):
#     mina=min(a,b,c)
#     maxa=max(a,b,c)
#     num=(mina,maxa)
#     return num
# print(getminmax(**d,a=12))
# print(getminmax(*s3,c=12))
# print(getminmax(12,*s3))
# print(getminmax(a=12,**d))
# print(getminmax(12,**d))
# print(getminmax(12,*s3))
# print(getminmax(12,*s2,c=12))
# print(getminmax(12,*s2,**d1))
# a=int(input('请输入第一个数'))
# b=int(input('请输入第二个数'))
# c=int(input('请输入第三个数'))
# def getminmax(a,b,c):
#     mina=min(a,b,c)
#     maxa=max(a,b,c)
#     num=(mina,maxa)
#     print('最小值%s最大值%s'%num)
# getminmax(a=a,b=b,c=c)
# def info(name,a=24,address='not nown'):
#     print('my name is:',name,'.i am from :',address,'.my age is:' ,a)
# info('chenyang')
# info('chenyang',32)
# info('chenyang',address='heilongjiang')


# def myadd(a,b,c=0,d=0,e=0):

#     print(sum((a,b,c,d,e)))
# myadd(100,100)
# myadd(100,100,1212)
# myadd(100,100,3453,45)
# myadd(100,100,12314,34,345)
# def myrange(start,stop=None,step=1):
  
#     l=[]

    
#     if step>0:
#         if stop==None:
#             stop=start
#             start=0

      
#         while len(l)
#             start+=step
#             l.append(start-1)
       
#     elif start>stop:
#         stop=start

#         while len(l)
#             start+=step
#             l.append(start+1)
#     return l  
# print(myrange(10,1,-1))


# def g(*b):
#     c=0
#     for i in b:
#         c+=i

#     print(c)




# g(2,3,4,5,6)



# def mymax(a,*b):
#     if type(a)!=type(0):
#         for i in a:
#             b=b+(i,)
#         mymax=a[0]

#     else:
#         mymax=a
#     for i in b: 
#         if mymax
#             mymax=i

#     print(mymax)

# mymax([1,23,4,5,6,3,3,3])
# mymax((1,23,4,5,6,3,3,3))
# mymax(1,23,4,5,6,3,3,3)
# mymax([1,23,4,5,6,3,3,3])
# mymax('fdfsadfsafafsafdsafsafdsafsa')
# def mymax(a,*b):
#     if not b:
#         mymax=max(a)
#     else:
#         mymax=max(a,max(b))

#     print(mymax)

# mymax([1,23,4,5,6,3,3,3])
# mymax((1,23,4,5,6,3,3,3))
# mymax(1,23,4,5,6,3,3,3)
# mymax([1,23,4,5,6,3,3,3])
# mymax('fdfsadfsafafsafdsafsafdsafsa')

你可能感兴趣的:(python基础,python)