Python Function Tutorial

Python Function Tutorial

Functions are named blocks of code designed to do one specific job. Functions allow you to write code once that can then be run whenever you need to accomplish the same task. Functions can take in the information they need, and return the information they generate. Using functions effectively makes your programs easier to write, read, test, and fix. In this tutorial, we will learn how to define a function, how to pass arguments, define parameters, set default values, and more.…

How To Read And Write Files In Python

python files

Python programs can read the information from files, as well as write data to files. While plain old variables are a good way to store data while a program is running, if you want to access that data after the program has finished, you need to save it to a file. Reading from files allows you to work with a wide range of information and writing to files makes it possible for users to pick up where they left off the next time they run the program.…

Python If Statements

python if statement

The Python if statement allows you to investigate the current state of a program and respond accordingly to that state. You can write a basic if statement that checks one condition, or you can create a series of if statements that identify the exact conditions you’re looking for. Some other languages offer a switch, or case, statement for these. Python keeps it simple and sticks with the if statement only.…

Python Dictionary Tutorial

dictionaries in python

Dictionaries in Python allow programmers to associate pieces of related information. Each piece of information in a dictionary is stored as a key-value pair. These are similar to associative arrays in other popular programming languages. To access the value in a dictionary, you provide the associated key. You can loop over dictionaries while accessing all of the values, keys, or the entire key-value pair. In this tutorial, we’ll take a look at how to create a dictionary, how to get the value of a key, how to put a dictionary in a list, how to add new key-value pairs, how to modify values, and more.…

Python Lists

python lists

A list stores a series of items which makes them good for keeping track of things, especially when the order or contents of the list might change. Lists are a mutable data structure, meaning you can alter that list as needed. Lists allow you to store sets of information in one place, whether you have just a few items or thousands of items. You can change a list, add new elements, delete elements, or replace elements as needed.…

Python Basics For Beginners

python basics for beginners

This introduction to Python is for beginning level students of the Python language. Python is skyrocketing in popularity as it is very beginner-friendly, yet can also be leveraged for the most intense programming challenges on earth. You might recall the news of Python being used to take a picture of a black hole. It sounds like some heavy-duty science to me! In this regard, you can start as a complete beginner and progress as far as you want – it’s entirely up to you.…

24 Popular Python Repositories

Popular Python Repositories

Check out these Popular Python Repositories to learn all about the cool things that are being developed with the Python programming language. The software we cover in this article includes httpie, flask, django, requests, ansible, scrapy, shadowsocks, tornado, scikit, reddit, ipython, sentry, docker compose, fabric, pyspider, salt stack, deis, boto, odoo, ajenti, and webpy. In looking at these popular Python repos, we can see that Python is used in applications like machine learning, big data, scientific analysis, IT and general automation, as well as web development.…