[Tutor] Help with python

2013-12-02 Thread Blake
I'm writing a program to calculate totals and change for a menu, and I'm having a few issues. If you could help me, it would be greatly appreciated. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.pyth

Re: [Tutor] Perl equivalent of $#var

2005-05-18 Thread Blake Winton
d look nicer to you if you had: colors = ['red', 'blue', 'green'] LAST_COLOR = len(colors) - 1 [...] if now == LAST_COLOR: # Do something. Later, Blake. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Generator function question?

2005-05-09 Thread Blake Winton
index = (index + 1) % 4 Why not go a step further? def neverEndingStatus(): statusChars = ['|', '\\', '-', '/'] while True: for char in statusChars: yield char or def neverEndingStatus(): w

Re: [Tutor] List comprehensions

2005-01-13 Thread Blake Winton
;x == item ="?) Perhaps someone more in touch with the compiler internals will chip in here. It is an interesting philosophical question, though. Later, Blake. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is there an easy way to conduct binary numbers?

2004-12-23 Thread Blake Winton
tion, and replacing the characters in the string. (If you need help getting that working, give it a good try, and post what you have, and I'll be happy to assist you.) Later, Blake. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] am I missing another simpler structure?

2004-12-16 Thread Blake Winton
grams easier to read/debug/optimize/prove correct. Later, Blake. ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor