27;, 'w') as f:
for i in my_list:
mystring = "UPDATE users set email='{0}' WHERE username='{1}';"
new_mystring = mystring.format(i['email'], i['username'])
f.write(new_mystring + '\n')
f.close()
On Thu, Jun 22,
Hi All,
My python skills are limited but I have managed to generate a couple
of lists using python and the psycopg2 library by querying a postgress
table and it's columns.
I would like to use the two generated lists from the python script to
create a file called upgrade_email_addresses.sql (and th
oday's Topics:
> >
> >1. Teaching Python (yehudak .)
> >2. Re: method, type? (Alan Gauld)
> >3. Re: Teaching Python (Alan Gauld)
> >4. Re: Teaching Python (Peter Otten)
> >5. Re: Teaching Python (Danny Yoo)
> >6. Re: Teachi
Yes that is a huge for loop.
I can do it like this but I won't try:
>>> for num in list(range(100)):
>>> print(num)
Sort of strange that the school wanted so much looping for your grandson,
they could have picked a lower number to demonstrate a for loop.
By the way there is the tqdm module
Thanks Steven and Peter, I de-dented and changed the variable name and it
works now.
Cheers,
Tahir
On Sat, Dec 26, 2015 at 1:42 PM, Peter Otten <__pete...@web.de> wrote:
> Tahir Hafiz wrote:
>
> > Finally getting round to doing some more python.
> > Stuck on a little onli
Finally getting round to doing some more python.
Stuck on a little online exercise:
"Define a function prod(L) which returns the product of the elements in a
list L."
Let's say L = [1, 2, 3, 4]
I have done this so far but it's not quite working:
def prod(L):
sum = 1
for i in L:
On Tue, Sep 11, 2012 at 10:18 PM, zack dunphey
wrote:
> I have used python a lot at school and am relatively good with it. I just
> tried to get it on my mac and i try to open a "new window" and every time I
> do it freezes and i have to either do a forced quit or unplug the whole
> computer. I
Does anyone know of a plugin or some other way to run python code in the
scribes text editor in a similar way to Idle which has a debugger?
Thanks,
Tahir
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mai
Cloud9 seems interesting as a browser based IDE. Do you know if there is a
way to run Python code as well create/edit it?
Thanks,
Tahir
On Thu, Jul 21, 2011 at 5:30 PM, Corey Richardson wrote:
> Excerpts from James Reynolds's message of Thu Jul 21 10:40:53 -0400 2011:
> > I might have to discus