Python String split() Method Python split() method splits the string into a comma separated list. It separates strings based on the separator delimiter. This method takes two parameters and both are optional. It is described below. Signature split(sep=None, maxsplit=-1) Parameters sep: A string parameter acts as a seperator. maxsplit: Number of times split perform. Return […]
Read More
The enumerate() method adds counter to an iterable and returns it (the enumerate object). The syntax of enumerate() is: enumerate(iterable, start=0) enumerate() Parameters enumerate() method takes two parameters: iterable – a sequence, an iterator, or objects that supports iteration start (optional) – enumerate() starts counting from this number. If start is omitted, 0 is taken […]
The process by which one class acquires the properties(data members) and functionalities(methods) of another class is called inheritance. The aim of inheritance is to provide the reusability of code so that a class has to write only the unique features and rest of the common properties and functionalities can be extended from the other class. […]
The __init__ method There are many method names which have special significance in Python classes. We will see the significance of the __init__ method now. The __init__ method is run as soon as an object of a class is instantiated. The method is useful to do any initialization you want to do with your object. […]
GOTO is a statement of the early beginnings of programming. It is rarely used in high-level code today.Code that makes use of it is called Spaghetti code by some people. I have almost never seen goto statements in code, so I’ve been curious about them. Python Python does NOT offer GOTO. However, somebody made a […]
Java literals are the fixed values assigned to a variable. A literal doesn’t require any computation and it is possible to assign a literal to a variable of a primitive type and also to a String even though String is not a primitive type in Java. Types of Literals Literals in Java can be classified […]
Polymorphism is an important concept of object-oriented programming Polymorphism means existing in many forms. Polymorphism is an object oriented programming feature that allows us to perform a single action in different ways. Example of Polymorphism> In real life, we, humans do it all the time. We become ‘Brother’, ‘Father’, ‘Son’, ‘Husband’… etc. And all these […]
Socket programming is the way of enabling the communication for sending and receiving the data between the socket endpoints, by using the code logics. The sockets can be a node, such as a server and a single or multiple client systems. In Python, socket programming can be put into operation with the help of the […]
Object is an instance of a class while class is a blueprint of an object. An object represents the class and consists of properties and behavior. Properties refer to the fields declared within class and behavior represents to the methods available in the class. In the real world, we can understand an object as a […]
Using loops in Python automates and repeats the tasks in an efficient manner. But sometimes, there may arise a condition where you want to exit the loop completely, skip an iteration or ignore that condition. These can be done by loop control statements. Loop control statements change execution from its normal sequence. When execution leaves […]
1.What Is It? To better understand exceptions and exception handling, let’s make a real-life comparison. Imagine that we order a product online, but while en-route, there’s a failure in delivery. A good company can handle this problem and gracefully re-route our package so that it still arrives on time. Likewise, in Java, the code can […]
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to […]
By registering here, I agree to LearnoVita Terms & Conditions and Privacy Policy