Gireesha Devara has Published 9 Articles

Namespaces and Scope in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:46:57

2K+ Views

In Python we work with variables, functions, libraries and modules, etc. Sometimes, the variable name you choose may already exist as the name of another variable, function, or method. This can be confusing or it might lead to unexpected behavior in your program. In such scenario, we need to learn ... Read More

Locating File Positions in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:44:37

1K+ Views

Locating file positions in Python means identifying the current position of the file pointer within an open file. Python provides the tell() and seek() methods of the file object for this task. Locating the File Position The tell() method tells you the current position within the file. In other words, ... Read More

Reading and Writing Files in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:41:08

18K+ Views

Reading data from a file and writing to a file can be easily done in Python by using the file object. The file object in Python provides a set of methods for handling files. These methods make our lives easier for interacting with files on our computer. Below, we will ... Read More

The import Statements in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:37:47

4K+ Views

In Python, accessing and using the code from one module to another module is possible by the importing process. That means, you can use any Python source file as a module by executing an import statement in some other Python source file. This is done using the import statement in ... Read More

Reading Keyboard Input in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:30:40

3K+ Views

Reading keyboard input in Python can be easily done by using the built-in functions. Python provides two built-in functions to read a line of text from standard input, which by default comes from the keyboard. These functions are: raw_input() input() ... Read More

The globals(), locals() and reload() Functions in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:25:38

2K+ Views

The globals() and locals() are the Python built-in functions that are used to return the names in the global and local namespaces, depending on the location from where they are called. Whereas the reload() method is used to manage the Python modules. The globals() Function The globals() function in Python ... Read More

Locating Modules in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:22:04

1K+ Views

Locating modules in Python refers to the process of how Python finds and loads a module into our current program when we are trying to import it. Python's standard library comes with a large number of modules that we can use in our programs with the import statement. Locating Modules ... Read More

The Anonymous Functions in Python

gireesha Devara

gireesha Devara

Updated on 01-Sep-2025 11:16:16

2K+ Views

The Anonymous Functions in Python Python creates function objects when you write a lambda expression using the lambda keyword. These functions are called anonymous functions because they are not defined using the standard def keyword. These functions are useful when you need a small, single-line function to execute a single ... Read More

Add Two Numbers in Python

gireesha Devara

gireesha Devara

Updated on 20-Jun-2025 19:37:53

3K+ Views

Adding two numbers in Python is one of the most basic tasks, where we need to combine their values to get a total. In this article, we will see different ways to add two numbers in Python. Using Arithmetic Operator To add two numerical values in Python, we can use ... Read More

1
Advertisements