This is my code-
def getNumbers(num):
myList=[]
for numbers in range(0,num,2):
print myList.append(numbers)
output-
>>> getNumbers(10)
None
None
None
None
None
Then i find out that list.append doesn't return anything.Then what should i
use for this kind of operation.but if i d
Try giving the print statement outside the for loop
On Mon, Oct 10, 2011 at 6:56 PM, Praveen Singh wrote:
> This is my code-
> def getNumbers(num):
> myList=[]
> for numbers in range(0,num,2):
> print myList.append(numbers)
>
>
> output-
> >>> getNumbers(10)
> None
> None
> Non
On 2011/10/10 03:26 PM, Praveen Singh wrote:
This is my code-
def getNumbers(num):
myList=[]
for numbers in range(0,num,2):
print myList.append(numbers)
output-
>>> getNumbers(10)
None
None
None
None
None
Then i find out that list.append doesn't return anything.Then what
sh
Praveen Singh wrote:
This is my code-
def getNumbers(num):
myList=[]
for numbers in range(0,num,2):
print myList.append(numbers)
output-
getNumbers(10)
None
None
None
None
None
Then i find out that list.append doesn't return anything.Then what should i
use for this kind of
On Mon, Oct 10, 2011 at 8:26 AM, Praveen Singh wrote:
> print myList.append(numbers)
Your problem is with that statement.
>>> mylist = []
>>> x = mylist.append(3)
>>> x
>>> x is None
True
>>> help(mylist.append)
Help on built-in function append:
append(...)
L.append(object) -- append objec
On 10 October 2011 14:26, Praveen Singh wrote:
> This is my code-
> def getNumbers(num):
> myList=[]
> for numbers in range(0,num,2):
> print myList.append(numbers)
>
>
> output-
getNumbers(10)
> None
> None
> None
> None
> None
>
> Then i find out that list.append doesn't
; print myList.append(numbers)
>
>
> output-
>>>> getNumbers(10)
> None
> None
> None
> None
> None
>
> Then i find out that list.append doesn't return anything.Then what should i
> use for this kind of operation.but if i do something like
2011/10/7 Emad Nawfal (عمـ نوفل ـاد)
> I want to re-structure English so that the adjectives appear after the
> nouns, instead of before.
> If I have a sentence like:
>
> The tall man plays well
> I need to change it to
> The man tall plays well
>
Others have offered plenty of help, though I not
On 10/10/11 20:23, George Nyoro wrote:
On 10/10/2011, tutor-requ...@python.org wrote:
Send Tutor mailing list submissions to
tutor@python.org
To subscribe or unsubscribe via the World Wide Web, visit
snip
>>
When replying, please edit your Subject line so it is more specifi
Hey all,
I'm trying to write a def that has a check to see if the entered information is
within a pre-determined valid set.
Below is what I have so far but it doesn't seem to be working properly.
What I want is to have the user be able to enter 1 through 8 and have the
information pass fine but
Wayne Werner wrote:
2011/10/7 Emad Nawfal (عمـ نوفل ـاد)
I want to re-structure English so that the adjectives appear after the
nouns, instead of before.
If I have a sentence like:
The tall man plays well
I need to change it to
The man tall plays well
Others have offered plenty of help, th
On Mon, Oct 10, 2011 at 3:13 PM, Mike Nickey wrote:
> Hey all,
>
> I'm trying to write a def that has a check to see if the entered
> information is within a pre-determined valid set.
> Below is what I have so far but it doesn't seem to be working properly.
> What I want is to have the user be ab
Mike Nickey wrote:
Hey all,
I'm trying to write a def that has a check to see if the entered information is
within a pre-determined valid set.
Below is what I have so far but it doesn't seem to be working properly.
What I want is to have the user be able to enter 1 through 8 and have the inform
On 10/10/11 23:13, Mike Nickey wrote:
What I want is to have the user be able to enter 1 through 8 and have
the information pass fine but anything else would cause the user to
repeat the process.
if not (1 <= value <= 8):
# handle error
else: # carry on as planned
I'm using a while loop
Okay, there is a python file called target.py. In the same directory there
is a file named main.py. You are the author of main.py. The code in main.py
will write to target.py. Then the antivirus catches main.py and removes, but
not the modification to target.py. Main.py can not create new files. Wh
Christopher King wrote:
Okay, there is a python file called target.py. In the same directory there
is a file named main.py. You are the author of main.py. The code in main.py
will write to target.py. Then the antivirus catches main.py and removes, but
not the modification to target.py. Main.py ca
On 10/10/2011 08:56 PM, Christopher King wrote:
Okay, there is a python file called target.py. In the same directory there
is a file named main.py. You are the author of main.py. The code in main.py
will write to target.py. Then the antivirus catches main.py and removes, but
not the modification
17 matches
Mail list logo