Python String lower()

Python String lower()

Python String lower() method converts all the uppercase characters in a string to lowercase characters and returns the string as output. lower() Syntax The Syntax of lower() method is: string.lower() lower() Parameters…
View Post
Python slice()

Python slice()

The slice() in Python is a built-in function that returns a slice object and slices any sequence such as string, tuple, list, bytes, range. slice() Syntax  The syntax of the…
View Post
Python dir()

Python dir()

The dir() method is an inbuilt function in Python which returns all the valid list of attributes and methods of any object. (functions, dict, list, string, tuple etc.) dir() Syntax …
View Post
Python enumerate()

Python enumerate()

The enumerate() in Python is a built-in function that adds a counter as a key to an iterable object (list, tuple, etc.) and returns an enumerating object. enumerate() Syntax  The…
View Post
Python complex()

Python complex()

Python complex() function takes real, imaginary numbers and strings as input and converts them into a complex number. This method takes two optional parameters (real and imaginary) and returns a…
View Post
Python callable()

Python callable()

The callable() function in Python returns True if the object passed appears to be callable. Otherwise, it returns False. callable() Syntax  The syntax of the callable() method is  callable(object) callable()…
View Post
Python bytearray()

Python bytearray()

Python bytearray() function returns a bytearray object that means it converts an object into bytearray objects, which is an array of given bytes. The bytearray() method provides mutable sequence of…
View Post
Python bytes()

Python bytes()

Python bytes() function return an immutable byte-represented object of given size and data. The bytes() method provides immutable(cannot be changed) sequence of objects in the range of 0 <= x…
View Post
Python divmod()

Python divmod()

The divmod() in Python is a built-in function that takes two numbers as input parameters and returns a pair of numbers (a tuple) consisting of their quotient and remainder. divmod()…
View Post
Python bool()

Python bool()

Python’s bool() function converts a given value into Boolean(True or False) using the standard truth testing procedure. bool() Syntax  The syntax of bool() method is  bool([value]) bool() Parameters The bool()…
View Post