by Dinesh Thakur Category: Python

What is command line arguments in Python?

You can find Command line arguments in almost every modern programming languages, including C, C++, PHP, Java and others. Python Command line arguments are given after the script name while executing it on the terminal. We also have command-line options to set some specific options for the script.



 
by Dinesh Thakur Category: Python

In this session of the Python tutorial, you'll learn in detail about for-loops in Python 3. you'll also know how to use the range() function for loops in Python 3. Further, you'll even know how to use else statements with loop, nested for loop in Python 3, and loop.



 
by Dinesh Thakur Category: Python

Python is easy to learn. Python language provides many helpful features that make it valuable and popular from many other programming languages. Python is a high-level programming language. It supports object-oriented programming, procedural programming approaches, and offers dynamic memory allocation. Python language provides interfaces to all significant commercial databases. We've listed some of the key features of python programming language.



 
by Dinesh Thakur Category: Python

A Python list is a sequence of values. It is the most basic mutable type data structure responsible for an ordered set of values and a versatile collection of data objects. An index identifies each item or sometimes in a list.



 
by Dinesh Thakur Category: Python

A Python program is divided into a number of logical lines.

Physical and logical lines

A physical line is a sequence of characters terminated by an end-of-line sequence. The end of a logical line is represented by the token NEWLINE. A logical line is ignored (i.e. no NEWLINE token is generated) that contains only spaces, tabs, or a comment. This is called "blank line". The following code



 
by Dinesh Thakur Category: Python

In this Python Operator tutorial, we will learn different types of operators in Python Programming Language, with their syntax and how to use them with examples.

Python Operator is a symbol (such as +, x, etc.) that represents an operation. An operation is an action or procedure which produces a new value from one or more input values called operands. There are two types of operators: unary and binary. The unary operator operates only on one operand, such as negation. On the other hand, the binary operator operates on two operands: addition, subtraction, multiplication, division, exponentiation operators, etc. Consider an expression 3+8, here 3 and 8 are called operands, while '+' is called an operator. The operators can also be categorized into:



 
by Dinesh Thakur Category: Python

We will demonstrate to write a simple Python program, which prints "Hello World". Type the following lines in IDLE text editor and save it as "HelloWorld.py".



 
by Dinesh Thakur Category: Python

If Statement, it is also known as a condition statement. If statement increase the functionality of a Python. The ability to use logic "if-then-else" in your program is one of the most basic and fundamental aspects for programming. Python programming provides an easy way to tell your program what to do if something is true, and what to do if something is false.



 
by Dinesh Thakur Category: Python

Python can manipulate string, which can be expressed in several ways. String literals can be enclosed in matching single quotes(') or double quotes("); e.g. 'hello', "hello" etc. They can also be enclosed in matching groups of three single or double quotes (these are generally referred to as triplequoted strings), e.g.'' 'hello''', """hello""". A string is enclosed in double quotes if the string contains a single quote (and no double quotes), else it is enclosed in single quotes.



 
by Dinesh Thakur Category: Python

What is a variable in python

Variable is a reserved memory storage location that has an associated symbolic name (called "identifier"), which contains some value (can be literal or other data) that can change. You do not need to declare variables before you use them, or declare its type. An identifier is a name used to identify a variable, function, class, module, or other objects. Literal is a notation for constant values of some built-in type. Literal can be string, plain integer, long integer, floating-point number, imaginary number. All variables in Python are an object. So I create a variable age and name and set that equal to anything i want. For example



 
by Dinesh Thakur Category: Python

In this Tutorial we truly learn how to download Python, So the Reason behind to download python is because we have to get the idea, we in which we write the python code, it is absolutely necessary to download python before we start writing any python syntax.



 
by Dinesh Thakur Category: Python

Python is an easy to learn, in-demand general-purpose interpreted, interactive, object-oriented, and high-level coding language, i.e. it is not necessary to compile it before you run it. It invented by Guido van Rossum is popularly referred to as the founder of Python programming throughout 1985- 1990. Python is an interpreted scripting language. Much like Perl, Python source code is also available under the GNU General Public License (GPL). This tutorial provides enough knowledge on Python programming language. This language was so named in honor the cast of the comic "Monty Python." Python syntax is straightforward, code indentation (rather than the use of braces) allows for very readable programs and more compact.



 


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.