The first place to see what Python is capable of out of the box is to familiarize yourself with the Documentation.
What is the Python documentation?
Thedocumentationexplains how a softwareoperates or how to use it.
If you are a beginner this will make little sense but as you progress, your understanding should increase. I would advise regularly going back to the documentation.
A good way to read about a function in Python is to google:library nametutorial
Functions in Python
All inbuilt functions in Pythonhttps://docs.python.org/3/library/functions.html
Credit:https://www.programiz.com/python-programming/methods/built-in
Python
print(abs(-5))
Output
5
print(all([0,1,1]))
False
Returns True if there is a True in a list,tuple or dictionary
*The opposite of all()
print(all([True, False, False]))
True
print(ascii("å"))
\e5
print(bin(50))
0b110010
Returns true unless
The object is empty, like [], (), {}The object is FalseThe object is 0The object is None
print(bool(50))
true
def x(): a = 5print(callable(x))
print(chr(97))
a
print(divmod(8, 3))
(2,2)
3 goes into 8 two times with two remaining therefore (2,2)
grocery = ['bread', 'milk', 'butter']enumerateGrocery = enumerate(grocery)print(list(enumerateGrocery))
[(0, 'bread'), (1, 'milk'), (2, 'butter')]
# list of alphabetsalphabets = ['a', 'b', 'd', 'e']# function that filters vowelsdef filterVowels(alphabet): vowels = ['a', 'e', 'i', 'o', 'u'] if(alphabet in vowels): return True else: return FalsefilteredVowels = filter(filterVowels, alphabets)for vowel in filteredVowels: print(vowel)
ae
x = 1print(eval('x + 1'))
2