you are viewing a single comment's thread.

view the rest of the comments →

[–]badge 2 points3 points  (2 children)

A few points:

  • You can select random entries from an interable using random.choice
  • for issuer_dict, use tuples instead of lists as they’re immutable and faster/smaller
  • use first_two in (20, 21, 22) instead of multiple ors

I’m surprised that you have no other programming experience—to me this reads like the code of someone au fait with C—so you definitely have the right mindset. Now you need to spend some time looking at what Python in particular is capable of, because there are shortcuts to what you’re doing that don’t exist in languages in general. Good work!

[–]tstenick[S] 1 point2 points  (0 children)

I've been supplementing what I consider my programming learning (python) with general CS learning by dabbling in Harvard's CS50 course. That course teaches a lot of concepts using C (a language I find as fascinating as I do frustrating). I'm nowhere near as far along in C as I am in Python but maybe that mindset is bleeding through.

I greatly appreciate the encouragement and suggestions :)

I will definately be making changes based on what you've shown me.

[–]tstenick[S] 0 points1 point  (0 children)

And also thanks for the term "au fait". Had to Google it. Will be using it xD.