The following 29 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

aka   can   cat   Dictionary   elements   Examine   few   Find   for   in   items   Iterate   just   key   last   list   of   over   Python   random   range   remember   sample   seem   the   Things   Tips   to   value  

Clear message

Python Tips

aka Things I can't seem to remember.

Find the last n elements of a list:

foo = random.sample(range(10, 30), 15)
foo[:-5:-1]

Iterate over a Dictionary

foo = {'a':3, 'b':7, 'cat':13}
for key, value in foo.items():
  print(key, value)

Examine just the first few items of a Dictionary:

list(foo.items())[0:3]

Python (last edited 2020-05-20 21:46:56 by ChrisSeidel)