List comprehension

List comprehension is very useful while working with lists. Using list comprehension, we can replace code for loops with a single expression.

Below is the syntax for list comprehension.

[<expression> for <element> in <list> if <condition>]

Example 1: Let’s look at an example by comparing how code looks like without…

Have you ever faced a situation where you have an image from which you want to copy text? There are several ways to do this.

OneNote has this option by default. Copy your image to OneNote and then right-click to see the option to ‘Copy Text from Picture’.

In most cases, it works perfectly.

‘Copy Text from Picture’ option

I like Jupyter Notebook for many reasons. Jupyter Notebook makes Machine learning models more readable. But it’s not having Intellisense by default.

It’s quite easy to enable Intellisense in Jupyter Notebook.

Add the below line at the top of the notebook.

%config IPCompleter.greedy=True

Press TAB to get the suggestions.

Data Geek

I write about Python, Unix, Data Engineering, and Automation Testing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store