References

Allen Downey - Think Python

Talks a lot, step by step, good for beginners

License: Creative Commons CC BY Non Commercial 3.0as reported in the original page

W3Resources website

Contains many simple exercises on Python basics, do them!

Software Carpentry

Software Carpentry is a website full of free educational resources, there is definitely a lot of good stuff to discover.

We highlight these tutorials:

You may find other stuff in Community Developed Lessons for Jupyter and Python

LeetCode

Website with collections of exercises sorted by difficulty and acceptance rate. You can generally try sorting by Acceptance and Easy filters.

We put here a selection.

LeetCode - Sets and Dictionaries

Check dictionary problems sorted by Acceptance and Easy.

Note: Keep in mind these problems are in section dictionaries for good reason: in order to execute fast they often require you to preprocess the data by indexing in it in some way, like i.e. putting strings in a set or as keys in a dicitonary so you can later look them up very fast.

WARNING: if you feel the need to use nested cycles, or search methods on lists/strings like .index, .find, in operator, .count, .replace on strings, try thinking first whether it is really necessary or you might use the above mentioned preprocessing instead.

Check in particular:

HackerRank

Contains many Python 3 exercises on algorithms and data structures (Needs to login)

Geeks for Geeks

Contains many exercises - doesn’t have solutions nor explicit asserts but if you login and submit solutions, the system will run some tests serverside and give you a response.

In general for Part A you can filter difficulty by school+basic+easy and if you need to do part B also include medium.

You can select many more topics if you click more>> un der Topic Tags:

immagine.png

Dive into Python 3

More practical, contains more focused tutorials (i.e. manage XML files)

Licence: Creative Commons By Share-alike 3.0 as reported at the bottom of book website

Introduction to Scientific Programming with Python

Focuses on numerical calculations, you can check first 7 chapters until dictionaries.

By Joakim Sundnes.

  • PDF for Python (only theory)

  • Exercises – a LOT of stuff, although some exercises are too much into engineering / maths compared to this book

  • EXTRA: if you like, it also contains chapters on classes which are certainly useful.

[ ]: