
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Rajendra Dharmkar has Published 189 Articles

Rajendra Dharmkar
15K+ Views
The following code shows how to get return value from a function in a Python class.Exampleclass Score(): def __init__(self): self.score = 0 self.num_enemies = 5 self.num_lives = 3 def setScore(self, num): ... Read More

Rajendra Dharmkar
3K+ Views
To upload a file, the HTML form must have the enctype attribute set to multipart/form-data. The input tag with the file type creates a "Browse" button.Example File: OutputThe result of this code is the following form −File: Choose file UploadHere ... Read More

Rajendra Dharmkar
43K+ Views
In Python, PYTHONPATH is an environment variable that specifies a list of directories to search for Python modules when importing them. When you import a module in Python, Python looks for the module in the directories specified in sys.path, which is a list of directories that includes the current working ... Read More

Rajendra Dharmkar
2K+ Views
The import statement in Python is used to bring code from external modules or libraries into your program. This is a powerful feature that allows you to reuse code and avoid duplicating code across multiple programs. Here are some examples of how to use the import statement: Import a single ... Read More

Rajendra Dharmkar
2K+ Views
In Python, a string is a sequence of Unicode characters, while a byte string is a sequence of raw bytes. Here are three examples that demonstrate the difference between a string and a byte string: Creating a String Example In this example, we define a string "Lorem Ipsum" using double ... Read More

Rajendra Dharmkar
3K+ Views
In Python, both modules and packages are used to organize and structure code, but they serve slightly different purposes. A Python module is a single file containing Python code that can be imported and used in other Python code. A module can define variables, functions, classes, and other Python constructs ... Read More

Rajendra Dharmkar
8K+ Views
In Python, you can use the import statement to use functions or variables defined in another module. Here are some code examples that demonstrate how to use multiple modules with Python import statement: Suppose you have two modules module1.py and module2.py that contain some functions: Example #module1.py def say_hello(name): ... Read More

Rajendra Dharmkar
1K+ Views
You generate random strings with upper case letters and digits in Python. Here are three different ways to do it: Using random.choices() and string.ascii_uppercase In this method, we will use the random.choices() function to randomly choose characters from the string.ascii_uppercase and string.digits strings to generate a random string. Example We ... Read More

Rajendra Dharmkar
12K+ Views
There are several ways to extract numbers from a string in Python. One way to extract numbers from a string is to use regular expressions. Regular expressions are patterns that you can use to match and manipulate strings. Here's an example code snippet that uses regular expressions to extract all ... Read More

Rajendra Dharmkar
10K+ Views
Importing modules is an essential part of programming in Python, and it's something you'll do a lot as you develop your skills. In Python, you can import multiple modules using a few different methods. Here are some examples of how to do it: Import each module on a separate line ... Read More