Python ord() Function26 Sept 2024 | 1 min read The python ord() function returns an integer representing Unicode code point for the given Unicode character. SignatureParameterscharacter: A character string of length 1. ReturnIt returns an integer that represents Unicode code point for the given Unicode character. Python ord() Function Example 1The below example shows the working of ord(). Output: 56 82 38 Explanation: In the above example, it returns an integer representing Unicode code point for the given Unicode character. Next TopicPython Built in Functions |
Function The python all() function accepts an iterable object (such as list,dictionary etc.). It returns True if all items in passed iterable are true, otherwise it returns False. If the iterable object is empty, the all() function returns True. Signature all (iterable) Parameters iterable - The objects which contain...
1 min read
Function function returns the reversed iterator of the given sequence. Signature reversed(sequence) Parameters sequence: It is a sequence that needs to be reversed. Return It returns the reversed iterator of the given sequence. Function Example 1 The above example shows the working of reversed for a sequence: string, tuple, list, and range....
1 min read
Function function is used to delete an attribute from a class. It takes two parameters first is an object of the class and second is an attribute which we want to delete. After deleting the attribute, it no longer available in the class and throws...
1 min read
Function The python list() creates a list in python. Signature list(iterable) Parameters iterable (optional) - An object that can be a sequence( string, tuple etc.) or collection( set, dictionary etc.) or iterator object. Return It returns a list. Function Example 1 The below example create a list from sequence: string, tuple and list. #...
1 min read
Function The python bin() function is used to return the binary representation of a specified integer. A result always starts with the prefix 0b. Signature bin(n) Parameters n - An integer Return It returns the binary representation of a specified integer. Function Example 1 x = 10 y = bin(x) print (y) Output: 0b1010 Note: The...
1 min read
Function Python, one of the most famous programming languages, offers a scope of inherent capabilities that improve on different undertakings. The range() function stands out as a versatile instrument for iteration and sequence creation. We will look the syntax, parameters, and practical applications of the range()...
2 min read
Function The python hasattr() function returns true if an object has given named attribute. Otherwise, it returns false. Signature hasattr(object, attribute) Parameters object: It is an object whose named attribute is to be checked. attribute: It is the name of the attribute that you want to search. Return It returns true if an...
1 min read
Function function returns the list of names in the current local scope. If the object on which method is called has a method named __dir__(), this method will be called and must return the list of attributes. It takes a single object type argument....
2 min read
Function The python any() function returns True if any item in an iterable is true, otherwise it returns False. Note : If the iterable is empty, then it returns False. Signature any(iterable) Parameters Iterable: It takes an iterable object such as list, dictionary etc. Return It returns true if at least...
2 min read
Function The python locals() method updates and returns the dictionary of the current local symbol table. A Symbol table is defined as a data structure which contains all the necessary information about the program. It includes variable names, methods, classes etc. Signature locals() Parameters It does not contain any parameters. Return It returns...
1 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India