Niharika Aitam

Niharika Aitam

133 Articles Published

Articles by Niharika Aitam

Page 14 of 14

How we can split Python class into multiple files?

Niharika Aitam
Niharika Aitam
Updated on 15-May-2023 3K+ Views

OOPs is abbreviated as object oriented programming language. It helps us to deal with the real time entities with inheritance, polymorphism, encapsulation etc. By using the oops concept we can make the code and functions work together in a better way. Group of objects is called a class. The class contains the blueprint, which takes as the reference to create the object. This contains attributes and methods in a logical entity. Now let’s see why we have to split the code into multiple classes. If we create the entire code in the single class, it will be easy to write ...

Read More

How to organize Python classes in modules and/or packages

Niharika Aitam
Niharika Aitam
Updated on 15-May-2023 1K+ Views

There are different modules or packages in the python classes. When we use their names as it is in the code it will be somewhat clumsy and not good to see. So, we need to organize the python classes in modules and packages. Modules are the group of functions, classes or any block of code kept in a single file. The file extension of the methods will be .py. If the python code is with 300-400 lines of code, then it can be made as a module for better understandability. The module name can be available as ...

Read More

List vs tuple vs dictionary in Python

Niharika Aitam
Niharika Aitam
Updated on 15-May-2023 30K+ Views

In python there are different types of data structures. Among them list, tuple, dictionary. All these three are used to store the data in the python programming language. What is a List? List is one of the data structures available in python which is used to store multiple values in a single data structure. We can create a list in Python using the square braces[ ]. It is mutable which means that we can modify a list once it is created. It takes multiple elements of different data types such as int, float, str etc which are separated by ...

Read More
Showing 131–133 of 133 articles
« Prev 1 10 11 12 13 14 Next »
Advertisements