Forum: Python Dec 20th, 2007 |
| Replies: 4 Views: 1,040 hey thanks for the reply,
I was wondering if my code was too mesy with the branched if statements
How may I amend this?
Jem |
Forum: Python Dec 20th, 2007 |
| Replies: 4 Views: 1,040 hey again,
I wrote this code.. very quickly and messily.
I would like to 'clean' it up.. that is put some functions in it.
def numWords(aString):
lst = aString.split()
noword = 0
... |
Forum: Python Dec 19th, 2007 |
| Replies: 3 Views: 2,081 Hey thanks for the reply
where exactly did you get the documentation from? |
Forum: Python Dec 19th, 2007 |
| Replies: 3 Views: 2,081 Hey guys,
I'm following a tutorial on Python and I came across this in one of the examples.
import time
today = time.localtime(time.time())
theDate = time.strftime("%A %B %d", today)
print... |
Forum: Python Dec 18th, 2007 |
| Replies: 2 Views: 963 Hey guys don't worry i just took some initiative and looked on the starting python thread |
Forum: Python Dec 18th, 2007 |
| Replies: 2 Views: 963 Hey guys,
I just wanted to know if anyone recommends an IDE because I am using IDLE and its not really shining.. to me.
Thanks. |
Forum: Python Dec 18th, 2007 |
| Replies: 3 Views: 972 Don't worry i figured everything out.
Thanks alot.
I'll be back soon with more questions :)
Bye for now |
Forum: Python Dec 18th, 2007 |
| Replies: 3 Views: 972 So does the code you have written works as efective as mine? Do I have to put the if loop? |
Forum: Python Dec 18th, 2007 |
| Replies: 3 Views: 972 is it possible to create a looping list?
import time
# a day value of None = >
def dayOfWeek(DayNum = None):
# match day order to Python return values
days = ['Monday','Tuesday',
... |
Forum: Python Dec 18th, 2007 |
| Replies: 2 Views: 1,048 Ok thanks alot I understand now.
thanks again. |
Forum: Python Dec 17th, 2007 |
| Replies: 2 Views: 1,048 Hey guys,
I don't understand the for loop. Could someone explain it to me?
for example
>>> # Measure some strings:
... a = ['cat', 'window', 'defenestrate']
>>> for x in a:
... print... |