Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

max and min int in python

max_int = pow(2, 31)-1
min_int = pow(-2, 31)
Comment

min and max in python

#min and max in python
L1 = eval(input('enter list:'))#eval() helps  inputting by user desires of list.
minimum=min(L1)#min() function helps to note smallest of the element.
print('minimum numeric',minimum)
maximum=max(L1)#max() function helps to note biggest of the element.
print('maximum numeric',maximum)
#output
enter list:[4,-8,65,24.0,24,7.25]
minimum numeric -8
maximum numeric 65
Comment

min max python

def min_max(*n):
  return {"min":min(n),"max":max(n)}
print(min_max(-10,1,2,3,45))
Comment

min max code in python

listA = [18, 19, 21, 22]
print('The smallest number from listA is:', min(listA))  	# 18
print('The largest number from listA is:', max(listA))		# 22

strA = 'AppDividend'
print('The smallest character from strA is:', min(strA))	# A
print('The largest character from strA is:', max(strA))		# v

strA = 'AppDividend'
strB = 'Facebook'
strC = 'Amazon'
print('The smallest string is:', min(strA, strB, strC))		# Amazon
print('The largest string is:', max(strA, strB, strC))		# Facebook
Comment

min() and max() Function in python

>>> max(7,22,733,56)
733
>>> min(3,3663,8727,82)
3
>>> max('hello', 'how', 'are', 'you')
'you'
>>> min('hello', 'how', 'are', 'you', 'Sir')
'Sir'
Comment

PREVIOUS NEXT
Code Example
Python :: python run system commands 
Python :: python ternary operators 
Python :: python inherit from objects 
Python :: how to add items in list in python 
Python :: setdefault python 
Python :: when to use map function in python 
Python :: what are arrays in python 
Python :: add key to dictionairy 
Python :: python own function and map function 
Python :: sum of diagonal numpy 
Python :: combination in python math 
Python :: np.random.randint 
Python :: python instagram bot 
Python :: reading an image using opencv library 
Python :: python elif syntax 
Python :: how to set background color for a button in tkinter 
Python :: python tkinter scrollbar 
Python :: ImportError: cannot import name 
Python :: add to list python 
Python :: mro in python 
Python :: excelwriter python 
Python :: uninstall python kali linux 
Python :: nested python list 
Python :: python builtwith 
Python :: python pandas change column order 
Python :: class views django slug 
Python :: I**2 python 
Python :: get linkinstance revit api 
Python :: endgame 
Python :: forgot password miguel grinberg 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =