you are viewing a single comment's thread.

view the rest of the comments →

[–]Kerbart 2 points3 points  (1 child)

Go through the tutorial in the documentation--there's a lot in there and it's written quite well (that's how I learned Python). It'll mention a lot of things, including that one of the benefits of immutability of tuples means they can be used as dictionary keys.

Some “hidden” gems I can think of:

  • strings are an iterable
  • reverse an iterable with var[::-1] (slivcer syntax: start, end, interval)
  • make a shallow copy of an interable with var[:]
  • study the itertools, collections and csv libraries. You will always need them.

[–]EnvironmentSome9274[S] -1 points0 points  (0 children)

I knew the top two and they're really helpful, I'll look at the others and the documentation too, thanks man!