How To Import Module In Python?

How To Import Module In Python?

Modules are used to store code, libraries, function in different and separate files. In order to use a module, it should be imported to the current code page properly. Not imported modules can not be used. So Python provides the import mechanism in order to import and use modules. These modules can be built-in modules … Read more

Python Class __init__ Method Tutorial

Python Class __init__ Method Tutorial

Python is an object-oriented programming language where the class is used to create new instances or objects. As class contains different data types and structures during the creation of the instance these data should be initialized properly. __init__ method is used to initialize a Python object during the creation. The __init__ method can be called … Read more

Python repr() Method Tutorial

Python repr() Method Tutorial

While developing applications different types of objects are used in Python programming language. In some cases, we may need to print these objects into the screen or standard output. Even there are different functions like print() it is mainly created for basic types. In order to print more complex type objects like class etc. repr() … Read more

Python next() Method Tutorial

Python next() Method Tutorial

next() is a method provided by Python programming language in order to iterate one step on an iterable object. next() is mostly used by iterable objects or variables like lists, tuples, file lines, etc. In this tutorial, we will examine the next() method in detail. next() Method Syntax The next() method is a built-in method … Read more

Python String isdigit() Method Tutorial

Python String isdigit() Method Tutorial

Python provides the isdigit() method in order to check if the given string completely consists of numbers and can be converted into the number without any problem. In this tutorial we will learn how to use the isdigit() method to check and validate if a given string is a number. isdigit() Method Syntax isdigit() method … Read more

Convert Array To String In JavaScript

Convert Array To String In JavaScript

JavaScript Array is used to store single or multiple items in a single variable. Arrays can store the same or different types of items like integer, string, object another array, etc. Array contents can be converted into the string by using different methods in JavaScript. But the array items should be convertible to the string. … Read more

JavaScript Math.round() Function Tutorial

JavaScript Math.round() Function Tutorial

JavaScript provides the Math.round() function in order to round a given number which is generally a float or double into the nearest integer. The Math.round() function is supported by all major browsers completely. Math.round() Function Syntax Math.round() function has a very simple syntax where the value or variable provided to the function and the rounded … Read more

PHP fopen() Function Tutorial

PHP fopen() Function Tutorial

PHP provides the fopen() function in order to open files. Even fopen() is created to open files it can also open different types of resources and protocols like HTTP, HTTPS, FTP, etc. Opening a file seem simple operation but it may have different file open modes like a read-write, read-only, open file if not exit … Read more

Python Random choice() and choices() Methods Tutorial

Python Random choice() and choices() Methods Tutorial

Python provides the random module in order to provide different random functions and methods. random.choice() method is one of the most popular method which is used to select random item from the given list. In this tutorial we will learn different use cases about the random.choice() method. random.choice() Method Syntax random.choice() method is provided via … Read more

How To Create Dictionary In Python?

How To Create Dictionary In Python?

Dictionary is a data type provided by Python programming language. Python dictionary is used to store key/value items. Every item consists of a key and value. The key can be an integer, string, or another type. Also, the value can be an integer, string, list, or an object. In this tutorial, we will examine how … Read more