Skip to main content

programming languages for beginners

NumPy Accessing Arrays

In this tutorial you will learn:

  • Access NumPy Array
  • Accessing Arrays with Negative Index

Access NumPy Array

The elements of NumPy Array can be accessed by indexing, it’s very similar to accessing an element in an array. We already know that the index of an array start with zero.

Example

Access a 1-D array is very simple and straight forward we just need to pass the index in square brackets and print the value.

Python File Reading

In this tutorial you will learn:

  • File Handling
  • File Handling in Python

File Handling

File Handling is an important concept to cover while learning any programming language. We need file handling to create, read, update or delete files. One of the biggest benefits of handling a file is that we can arrange data any way we want without requiring a specific template to follow. But using files for storing data works best for only small datasets. For larger datasets we may need to use a database.

File Handling in Python

Python Custom Modules

In this tutorial you will learn:

  • Modules
  • Modules in Python
  • Creating your own Modules
  • Using your own Modules
  • Finding contents of a Module

Modules

We have been using Modules for quite a while now. We noticed that after importing the modules we had access to more functions in our code. So a Module is a package that contains different sets of functions, classes and variables. Whenever be bring the module in our code we get those extra functions by just writing a single line of code at the top.