Python Control Flow

This tutorial will discuss how the python interpreter shares the processing among the source code. To prioritize the control python used below keywords to direct the control flow. 1. if Statements 2. for Statements 3. The range() Function 4. break and continue Statements, and else Clauses on Loops 5. pass Statements 6. Defining Functions 7. More on Defining Functions 7.1. Default Argument Values 7.2. Keyword Arguments 7.3. Arbitrary Argument […]

Python Naming Convention Rules

1. General Avoid using names that are too general or too wordy. Strike a good balance between the two. Bad: data_structure, my_list, info_map, dictionary_for_the_purpose_of_storing_data_representing_word_definitions Good: user_profile, menu_options, word_definitions Don’t be a jackass and name things “O”, “l”, or “I” When using CamelCase names, capitalize all letters of an abbreviation (e.g. HTTPServer) 2. Packages Package names […]

Learn Numpy

Numpy is a general-purpose array-processing package. It provides a high-performance multidimensional array object, and tools for working with these arrays. It is the fundamental package for scientific computing with Python.Besides its obvious scientific uses, Numpy can also be used as an efficient multi-dimensional container of generic data. Numpy Array Array in Numpy is a table of […]

Unix / Linux – Shell Basic Operators

There are various operators supported by each shell. We will discuss in detail about Bourne shell (default shell) in this chapter.According to the operation performed on the operators it has been classified into the below types. We will now discuss the following operators − Arithmetic Operators Relational Operators Boolean Operators String Operators File Test Operators […]

Python 3.X base64.standard_b64encode encoding is required byte given str

Python 3.* is required byte not string to resolve this issue we need to convert the string into UTF-8 then again after encoding we need to convert in to ascii. token = base64.standard_b64encode(” samplestring “.encode(‘UTF-8’) + ‘:’.encode(‘UTF-8’) + “samplestring”.encode(‘UTF-8’)).decode(‘ascii’)

Python Operator – Types of Operators in Python

Being a high level language where it can fit into most of the system it has the capability to handle the all data types.To handle this data the operators are categorized into below 7 categories . Python Arithmetic Operator Python Relational Operator Python Assignment Operator Python Logical Operator Python Membership Operator Python Identity Operator Python Bitwise Operator Python Arithmetic Operator […]

Creating Virtual Environment in Python using Command Line Arguments

Installing packages using pip In virtualenv This guide discusses how to install packages using pip and virtualenv. These are the lowest-level tools for managing Python packages and are recommended if higher-level tools do not suit your needs. Note This doc uses the term package to refer to a Distribution Package which is different from a […]

Installation of Python Version(2.7/3.*) in Windows

[lwptoc min=”2″ depth=”6″ hierarchical=”1″ numeration=”decimalnested” numerationSuffix=”none” title=”Contents” toggle=”1″ labelShow=”show” labelHide=”hide” hideItems=”0″ smoothScroll=”1″ width=”auto”] Installation of Python Version(2.7/3.*) is very easy because of it GUI Installer. Which made life simple for the programmer. For the installation of Python, we need to follow the below steps. If you are a beginner in python before choosing the version […]

Difference Between Pyhton 2.X Vs 3.X

The key differences between Python 2.7.x and Python 3.x with examples Many beginning Python users are wondering with which version of Python they should start their career. Our answer to this question is usually something along the lines “just go with the version your favorite tutorial was written in, and check out the differences later […]