×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Malhar Lathkar
has Published
109
Answers
How can import python module in IDE environment available in tutorialspoint?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 02-Jun-2018 12:03:37
You can import any built-in module while writing Python script using TutorialsPoint's online IDE. For example you can import time, sys, os, re modules. However, the modules that are not bundled with the distribution - the one which needs to be installed using package managers like pip or conda - ...
Read More
How can I remove the same element in the list by Python
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 02-Jun-2018 11:39:30
Just remove return statement outside for block. It will work. Also last print statement should have remove_same instead of remaove_newdef remove_same(L1, L2): L1_copy = L1[:] for e in L1_copy: if e in L2: L1.remove(e) ...
Read More
How to replace backward "\" slash from a string
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 10-May-2018 01:06:45
In Python it does give the desired result>>> var = "aaa\\bbb\\ccc and ddd\\eee" >>> var.split('\\') ['aaa', 'bbb', 'ccc and ddd', 'eee']
How to replace Digits into String using Java?
Java 8
Object Oriented Programming
Programming
Malhar Lathkar
Published on 02-May-2018 14:40:23
For this purpose, we create an object of HashMap class which is defined in java.util packageMap<String, String> map = new HashMap<String, String>();This hashmap object associates each digit with its corresponding word representationmap.put("0", "zero");Initialize an empty string object.String newstr="";Next, run a for loop over the length of given string and extract each ...
Read More
How i can replace number with string using Python?
Python
WX Python
Malhar Lathkar
Published on 02-May-2018 14:01:57
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 ...
Read More
How can I test if a string starts with a capital letter using Python?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 01-May-2018 00:32:24
To be precise, above string four words starting with uppercase character. This, Delhi, City and India.Two string functions should be used for this purpose. Assuming that words in the string are separated by single space character, split() function gives list of words.Secondly to check if first character of each word ...
Read More
How do we provide comments in Python?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 01-May-2018 00:09:51
Comment is a text in a computer program that is a programmer-readable explanation or annotation in the source code. It is ignored by compiler/interpreter. In Python script, the symbol # indicates start of comment line. It is effective till the end of line in the editor. If # is the first ...
Read More
How to pass arguments by reference in Python function?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 30-Apr-2018 23:59:16
In Python, function arguments are always passed by reference. This can be verified by checking id() of factual, formal arguments and returned objectdef foo(x): print ("id of received argument", id(x)) x.append("20") return x a = ["10"] print ("id of argument before calling function", id(a)) b = foo(a) ...
Read More
Python3 - Why loop doesn't work?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 30-Apr-2018 23:48:10
It does work. As you have used sleep() method inside the loop, no activity takes place for (0.9*36) seconds. It is not asking for input. After the end of loop, the window will show text field with the given string inside it.
How to indent multiple if...else statements in Python?
Python
Server Side Programming
Programming
Malhar Lathkar
Published on 15-Feb-2018 01:00:46
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: ...
Read More
1
2
3
4
5
6
7
...
11
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout