List Headline Image
Updated by Santosh Sahu on Dec 18, 2020
 REPORT
Santosh Sahu Santosh Sahu
Owner
12 items   1 followers   12 votes   3 views

Python Tutorial

Python is a widely used high level, interpreted and interactive programming language. It was first developed in 1991 by Guido Van Rossum and designed with the philosophy of code readability which enables programmers to express ideas and logic in fewer lines of code. It is used for web development (server-side), system scripting, software development, data handling and performing complex mathematical operations.

Source: https://www.alphacodingskills.com/python/python-tutorial.php

There are various iterable objects in Python like lists, tuples, sets, dictionaries, and strings, etc. These iterables can get iterator form which means that an iterator can be iterated upon and each elements of the iterator can be accessed using a loop statement. In Python, an iterator object must implement following methods:

  • iter__(): to initialize an iterator.
  • next__(): to perform operations for next element and return next element of the iterator.

One of the most important parts of learning any programming language is to understand what are the available data types, and how data is stored, accessed and manipulated in that language. Python is an object-orientated language, everything in Python is an object, and every value in Python has a datatype. Hence, in Python, data types are classes and variables are an instance (object) of these classes.

The Python has a number of methods and functions that are available for use with sets. These methods and functions are listed below in alphabetical order. For more details about any one of these, please visit its page.

The Python has a number of methods and functions that are available for use with tuples. These methods and functions are listed below in alphabetical order. For more details about any one of these, please visit its page.

The Python has a number of methods and functions that are available for use with lists. These methods and functions are listed below in alphabetical order. For more details about any one of these, please visit its page.

The Python has a number of methods and functions that is used for file handling. These methods and functions are listed below in alphabetical order. For more details about any one of these, please visit its page.

The Python has a number of methods and functions that are available for use with strings. These methods and functions are listed below in alphabetical order. For more details about any one of these, please visit its page.

Keywords are reserved words which can not be used as variable names, function names, or any other identifiers. Python has a number of keywords that are available for use in programming. A list of these keywords with brief description are mentioned below. For more details about any keyword, please visit its page.

The Python has a number of functions that are always available for use. These functions are called built-in functions. For example, print() function prints the given object on the screen or other standard output devices. These built-in functions are listed below in alphabetical order. For more details about any built-in function, please visit its page.

Array attributes reflect information that is intrinsic to the array. Accessing an array through its attributes allows to get and sometimes set intrinsic properties of the array without creating a new array.

The NumPy package contains a number of functions which can be used to create an array from an existing data. asarray(), frombuffer() and fromiter() fuctions.

NumPy ndarray objects can be indexed using Python x[selection_obj] syntax, where x is the array. There are three kinds of indexing available in numpy: field access, basic slicing, advanced indexing.