Edmonton.py

The Edmonton Python User Group

edmontonpy.com
@edmontonpy

edmontonpy.slack.com

YEGSEC

1st sunday of every month
3rd Tuesday at Startup

yegsec.ca

Today's talks

An Introduction to Machine Learning Data Pipelines in python

by Ryan Chartier

Python Events

 

  • AccelerateAB 2018 (AI) 
    April 23-24, 2018 - Edmonton

  • PyCon 2018​
    May 9-17, Cleveland, OH

 

NEXT MEETUP ON APRIL 12TH

Resources

Releases

Articles

  • Python Tip: use Enumerate on Lists or Tuples to keep track of the index.

Just a simple tip that helps you keep track of the index while you're looping over a list, or a tuple. Example shown below:

cats = ['ghost', 'gambit', 'marshmallow']
for index, cat in enumerate(cats):
    print("{}, {}".format(index, cat))
0, ghost
1, gambit
2, marshmallow

The result of the above will show the lines with the index first and the value of the list second

Hopefully you find this valuable!

March 2018

By EdmontonPy

March 2018

  • 416

More from EdmontonPy