I will read this when I get a minute, but I must say thanks for the explanation.
tutor@python really is the most helpful mailing list EVER!
> Date: Tue, 24 Jun 2014 00:54:30 +1000
> From: st...@pearwood.info
> To: tutor@python.org
> Subject: Re: [Tutor] write dictionary to file
>
> On Mon, Jun
On Mon, Jun 23, 2014 at 09:17:44AM +, Ian D wrote:
> > for row in spamreader:
> > if row['year'] == '40':
> > email = row['user'] + '@email.com'
> > output = [ row[fieldname] for fieldname in fields ]
>
> I am unsure about this syntax [ row[fieldname] for fieldname in fiel
Ok I used :
spamwriter.writerow({'user':email,'first':row['first'],'last':row['last'],
'password':row['password'] })
Seems to be almost finished thanks
> From: dux...@hotmail.com
> To: tutor@python.org
> Date: Mon, 23 Jun 2014 09:17:44 +
> Subject:
Ian, take a step back; the first step to solve a problem is to state it
clearly. You want to write a dict to a file.
(1) What would the dictionary look like? Give concrete example, e. g.
{"foo": 42, "bar": 'that\'s not "funny"'}
(2) What should the resulting file look like when you open it in a
On 23/06/14 06:56, Shreyas Mangalgi wrote:
I want to be able to send URI in NDEF format to my Arduino UNO which is
connected to Sony's RC-S801 dynamic NFC tag.
I have no idea what most of that means in practice.
This looks very Arduino specific so you will probably get better results
asking on
>>
>> import csv
>>
>> csvfile= open('StudentListToSort.csv', newline='')
>> spamreader = csv.DictReader(csvfile,delimiter=',',quotechar='|')
>
> Are you sure that your input file uses | as a quote character and , as
> the field delimiter?
No I overlooked this
>
>
>> #open a file to write to l
Thanks a lot this is really helpful as have been the other posts.
>
> Have you tried reading the documentation? It sounds like you're just
> throwing random bits of code at it and hoping something works.
>
> A better approach is to slow down and try to understand what the csv is
> doing, what it
On 23/06/14 01:32, Deb Wyatt wrote:
In future post real code, real output and real errors.
That way we have some chance of helping you.
--
I know, i'm sorry. I was avoiding posting the actual
> code because it was an assignment,
Its even more important for assignments because without real
co
I want to be able to send URI in NDEF format to my Arduino UNO which is
connected to Sony's RC-S801 dynamic NFC tag.I used Hercules setup utility
to send
"10010100031b0030d102165370d1011255017374757474676172742e736f6e792e646500"
for http://www.stuttgart.sony.de and I was a
>
> Not if you don't show us your code!
>
> > never mind. I figured it out. I was using %d instead
> > of %f in my print statements. duh.
>
> 'duh', indeed but how could we possibly have helped since
> you didn't post any print statements?
>
> In future post real code, real output and real
10 matches
Mail list logo