Re: [Tutor] Newbie to Python: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-25 Thread Mark Lawrence
On 25/06/2015 23:51, Alan Gauld wrote: On 25/06/15 19:42, Saran Ahluwalia wrote: My question can be found here: http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-csv-that-belong-to-the-same-tag-key-in-python It would have been helpful to post the question here rather th

Re: [Tutor] Newbie to Python: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-25 Thread Alan Gauld
On 25/06/15 19:42, Saran Ahluwalia wrote: My question can be found here: http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-csv-that-belong-to-the-same-tag-key-in-python It would have been helpful to post the question here rather than just a link. However, having read i

[Tutor] Newbie to Python: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-25 Thread Saran Ahluwalia
My question can be found here: http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-csv-that-belong-to-the-same-tag-key-in-python Here is an additional sample sample of the XML that I am working with: 0 0 0 0

Re: [Tutor] FW: query

2015-06-25 Thread Whom Isac
Sorry, the interpreter uses colour which is why some code is missing. Here is the text version of my code: def odd_or_even(): X=input("Enter the number which you want to check for odd and even: ") try: number=int(X) print("The number %s is ODD."%(number)if number%2!=0 else

Re: [Tutor] FW: query

2015-06-25 Thread Whom Isac
*def *odd_or_even(): X=input("Enter the number which you want to check for odd and even: ") number=int(X) print("The number %s is ODD."%(number) *if *number%2!=0 *else *"The number %s is EVEN."%(number)) On Thu, Jun 25, 2015 at 1:53 PM, Whom Isac wrote: > Hi, abhijeet...@yahoo.in: >

Re: [Tutor] FW: query

2015-06-25 Thread Whom Isac
For abhijeet...@yahoo.in: I had posted few solution to your question before but unfortunately they were sent to Alan Gauld mail because I am not used to the tutor@python.org mail system. Here is the code that will work: ""ODD/EVEN finder:""" def odd_or_even(): X=input("Enter the number which