Built-in function in python - min, max, len, round, power, sorted, type, sum

Опубликовано: 04 Октябрь 2024
на канале: Parag Dhawan
282
8

Built-in functions
The Python interpreter has a number of functions that are built into it and
are always available. You have already looked at some of the built-in functions like input(), print(), range()
=============================================================================
code:-
0:28 min
min(1, 2, 3, 4, 5)
min(25, 65, 89, 15)
1:02 max
max(4, 5, 6, 7, 8)
max(25, 65, 890, 15)
1:25 divmod
divmod(5, 2)
divmod(8.5, 3)
2:12 len
len("Parag Dhawan")
2:35 round
a = 3.6
round(a)
b= 1.4
round(b)
c= -1.2
round(c)
d= -1.7
round(d)
3:10 pow
pow(3,2)
3:34 sorted
l = [0,-10,15,-2,1,12]
l1 = sorted(l,reverse= True)
l1
l2 = ["Parag ", "Prabhakar", "dhawan"]
l3 = sorted(l2)
l3
l4 = sorted(" parag Prabhakar dhawan".split())
l4
d1 = { 1:"parag",2:"prabhakar",3:"dhawan"}
l5 = sorted(d1)
l5
l6 = sorted(d1,reverse=True)
l6
d1.get(3)
8:09 type
r = range(0,30)
print (type(r))
print (r)
print (type(10))
print (type('0'))
9:23 sum
l6 = [10,20,30]
sum(l6)

============================================================================= Link for Tutorial Series

Jupyter Notebook Tutorial Series:-
   • How To Open Jupyter Notebook in Windows  

Python Tutorial Series:-
   • Introduction to Python | Python Appli...  

Python Assignments and Objective Questions:-
   • Objective Questions Python - 1  

Tech. Videos By Parag Dhawan    • Template Matching Using OpenCV (Pytho...  
============================================================================= Feel free to connect and ask your queries:-

Linkedin:-   / parag-dhawan  
Youtube:-    / paragdhawan  
Facebook Page:- http://fb.me/dhawanparag
Instagram: -   / paragdhawan  
Twitter:-   / dhawan_parag  
GitHub:- https://github.com/paragdhawan/
Facebook Profile:- https://www.facebook.com/profile.php?...

============================================================================= Show your support by Subscribing to the channel:-
https://www.youtube.com/c/ParagDhawan... ============================================================================= Link of Next video:-    • How to Use Third Party Modules in Pyt...  
=============================================================================
#ParagDhawan
#PythonCrashCourse
#Python
#PythonTutorialForBeginners
#PythonForDataScience
#PythonProgramming
#PythonProgrammingLanguage
#PythonTutorial
#PythonCode
#Python3

=============================================================================
Note: Watch the video at a speed of 1.5