Built-in Methods

How to Open Files in Python

Python gives us file handling methods within its standard library. This is really convenient as a developer since you do not really need to import any more modules for handling files. The key methods provided to us by the Python for file handling are open(), close(), write(), read(),seek() and append(). Let’s go over the open() […]

How to Open Files in Python Read More »

Python filter() function

Python’s filter() function is used to filter the elements of an iterable (sequence) with the help of a predicate that tests each element on the iterable. A predicate is a function that always returns True or False. We cannot use a generic function with filter(), since it returns all elements only if a suitable condition

Python filter() function Read More »

Python breakpoint() Function

Debugging in Python has had its fair share of issues for developers. A common debugger was the pdb debugger. But, to analyze the session, we would need to do something like: Output While you can get the contents of your environment and all the associated variables using pdb.set_trace(), it often becomes very time consuming to

Python breakpoint() Function Read More »