Forum: Python Jun 27th, 2009 |
| Replies: 5 Views: 1,039 If I understand you correctly, you probably want something like
if x is None:
print "x has no value" |
Forum: Python Mar 21st, 2009 |
| Replies: 3 Views: 516 You can just do
import sys
sys.path.append('pythonpathhere') |
Forum: Python Feb 22nd, 2009 |
| Replies: 7 Views: 502 you could just do
print "The location of the largest number is", (1+l1.index(max(l1))
or something similar |
Forum: Python Feb 20th, 2009 |
| Replies: 7 Views: 502 It would help if you wrapped your code in [CODE ] [/ CODE] tags |
Forum: Python Jul 17th, 2008 |
| Replies: 6 Views: 605 No, put code tags around the code in your post eg.
[code ]
#python code here
[/code ] |
Forum: Python Jul 7th, 2008 |
| Replies: 4 Views: 504 it is equal to 15 because you are passing b_var to the function
c_var = a_func(b_var)
you are getting mixed up between the a_var in the function and the other a_var |
Forum: Python Jul 5th, 2008 |
| Replies: 2 Views: 1,045 I would suggest going through the tuturials at docs.python.org |
Forum: Python Jul 1st, 2008 |
| Replies: 2 Views: 469 I know this doesn't answer the question, but
Could you just use True and False keywords instead of Y and N? |
Forum: Python Jun 29th, 2008 |
| Replies: 7 Views: 5,652 Why did you import math near the middle of the code instead of the beginning? |