Malhar Lathkar

Malhar Lathkar

About

Malhar Lathkar has been teaching different programming technologies for last three decades. After completing M.Sc. Electronics, he started his career as Lecturer in Electronics. Fascinated by Computer languages and programming, he started his own software training and development centre in 1986. Thousands of undergraduate and PG students as well as professionals have been trained by him. His students are working with many of the leading IT companies across the world. He has always encouraged students to be entrepreneurs and many of them are having their own successful IT ventures. He is associated with TIEC (Technology Innovation Entrepreneurship Center) set up by SGGSIE&T Nanded. He has designed many software solutions with applications in Banking, Healthcare, automation etc. His teaching is deeply influenced by his experience in software development. Java, Python, PHP and database technologies are his areas of interest and expertise. Besides he is an avid sports enthusiast, a freelance columnist for a local Marathi daily and relishes Hindustani classical music.

24 Articles Published

Articles by Malhar Lathkar

Page 2 of 3

How can import python module in IDE environment available in tutorialspoint?

Malhar Lathkar
Malhar Lathkar
Updated on 15-Mar-2026 1K+ Views

The TutorialsPoint online Python IDE provides a convenient browser-based environment for running Python code. While it supports Python's built-in standard library modules, importing external third-party packages has limitations. Available Standard Library Modules The TutorialsPoint Python IDE comes with most standard library modules pre-installed. You can import these modules directly without any special setup ? import math import datetime import random print("Square root of 16:", math.sqrt(16)) print("Current date:", datetime.date.today()) print("Random number:", random.randint(1, 10)) Square root of 16: 4.0 Current date: 2024-01-15 Random number: 7 How to Import Modules in TutorialsPoint IDE ...

Read More

How to replace backward "" slash from a string

Malhar Lathkar
Malhar Lathkar
Updated on 23-Jun-2020 729 Views

In Python it does give the desired result>>> var  = "aaa\bbb\ccc and ddd\eee" >>> var.split('') ['aaa', 'bbb', 'ccc and ddd', 'eee']

Read More

How i can replace number with string using Python?

Malhar Lathkar
Malhar Lathkar
Updated on 20-Jun-2020 2K+ Views

For this purpose let us use a dictionary object having digit as key and its word representation as value −dct={'0':'zero', '1':'one', '2':'two', '3':'three', '4':'four',      '5':'five', '6':'six', '7':'seven', '8':'eight', '9':'nine'Initializa a new string object newstr=''Using a for loop traverse each character  ch from input string at check if it is a digit with the help of isdigit() function. If it is digit, use it as key and find corresponding value from dictionary and append it to newstr. If not append the character ch itself to newstr. Complete code is as follows:string='I have 3 Networking books, 0 Database books, and 8 Programming ...

Read More

What does colon ':' operator do in Python?

Malhar Lathkar
Malhar Lathkar
Updated on 18-Jun-2020 10K+ Views

The : symbol is used for more than one purpose in PythonAs slice operator with sequence −The − operator slices a part from a sequence object such as list, tuple or string. It takes two arguments. First is the index of start of slice and second is index of end of slice. Both operands are optional. If first operand is omitted, it is 0 by default. If second is omitted, it is set to end of sequence.>>> a=[1, 2, 3, 4, 5] >>> a[1:3] [2, 3] >>> a[:3] [1, 2, 3] >>> a[2:] [3, 4, 5] >>> s='computer' >>> s[:3] ...

Read More

How to indent multiple if...else statements in Python?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 3K+ Views

Use of indented blocks is an important feature of Python. Indent level of the block is more than previous statements. Hence, if multiple if statements are present in a program in nested fashion, each subsequent indented block will have increasing level of indent.if expr1==True: if expr2==True: stmt1 else: if expr3==True: stmt2 else: if expr3==True: stmt3 else: stmt4

Read More

Can we use break statement in a Python if clause?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 270 Views

Python's break keyword is used as decision control statement. It causes the remaining iterations to be abandoned and control of execution goes to next statement after the end of loop. Invariably it is executed conditionally and appears inside if block within a loop.while expr==True:     stmt1         stmt2         if expr2==True:        break     stmt3     stmt4   However it can't be used in an if block if it is not a part of loop. 

Read More

Can we use continue statement in a Python if clause?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 271 Views

Python's continue statement is a loop control statement. It causes starting next iteration of loop after abandoning current iteration. Invariably is is executed conditionally i.e. in if blockwhile expr==True:     stmt1     stmt2     if expr2==True:        continue     stmt3     stmt4However, it can't be used in an if block if it is not a part of loop. If used, interpreter will throw syntax error.

Read More

What are the >> and << operators in Python?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 332 Views

The symbols > are defined as left and right shift operators respectively in Python. They are bitwise operators. First operand is a bitwise representation of numeric object and second is the number of positions by which bit formation is desired to be shifted to left or right.The >> a=60 >>> bin(a) '0b111100' >>> b=a> b 240 >>> bin(b) '0b11110000'You can see two bits on right set to 0On the other hand >> operator shifts pattern to right. Most significant bits are set to 0>>> a=60 >>> bin(a) '0b111100' >>> b=a>>2 >>> b 15 >>> bin(a) '0b111100'

Read More

How does == operator works in Python 3?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 220 Views

The == symbol is defined as equality operator. It returns true if expressions on either side are equal and false if they are not equal>>> (10+2) == 12 True >>> 5*5 == 5**2 True >>> (10/3)==3 False >>> 'computer'=="computer" True >>> 'COMPUTER'.lower()=='computer' True

Read More

What does 'is not' operator do in Python?

Malhar Lathkar
Malhar Lathkar
Updated on 26-Feb-2020 593 Views

In Python, is and is not operators are called identity operators. Each object in computer's memory is assigned a unique identification number (id) by Python interpreter. Identity operators check if id() of two objects is same. 'is not' operator returns true of id() values are different and false if they are same.>>> a=10 >>> b=a >>> id(a), id(b) (490067904, 490067904) >>> a is not b False >>> a=10 >>> b=20 >>> id(a), id(b) (490067904, 490068064) >>> a is not b True

Read More
Showing 11–20 of 24 articles
Advertisements