Code 85
Published in

Code 85

Two Simple Ways to Count Backwards in Python

Learn to use the range() function

Photo by Annie Spratt on Unsplash

There are a variety of reasons to count backwards in a program. Maybe you want to iterate over a list starting from the end or simply want to display a countdown timer.

We have multiple options available to us and are going to introduce two of those options: manually modifying a counter variable and using…

--

--

--

Plain language programming tutorials for non-developers

Recommended from Medium

How to Scrape Retail Websites like Costco using Costco Data API?

Taming The Elephant

Deploying ELK Stack for Apache Logs Analysis

The MVP

Compilation Process for C Programs, how does it works?!

It is entirely possible to have an error that results

Making a MMO from scratch — The server structure

Phagocytosis DevLog #2 — Environment Interactions and Dialog

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jonathan Hsu

Jonathan Hsu

Top writer with 2.5M+ views. https://medium.com/@jhsu98/membership

More from Medium

These Tips will help you to install libraries in python more efficiently

‘Break’ & ‘Continue’ In Python — Explained in Simple Terms

7 Useful Examples of Python’s itertools

Property decorator is another attribute that never exist within the class definition