Hi, I'm new to programming. I'm using python 3 and Debian Linux. My
name is Ivan. I'm bad in for loops, I can't complete the following code:
input_word = input(Word to translate -- )
How to change this to for loops?
a, b, c, d, e, f, g, h = 1, 2, 3, 4, 5, 6, 7, 8
let say i have a file with random letters of A, AB, C, CD, AC, A, D, CD, DD,
C, B, AB, CD, AB
How do i count the occurrence of each individual item.
def occurence(name):
infile = open('bloodtype1.txt', 'r')
lst = infile.read()
infile.close()
print(lst.count('AB')) # 3
Using PostgreSQL XML functions will be more efficient here, check
http://stackoverflow.com/questions/4967117/create-xml-from-postgresql/10399117#10399117for
examples.
You can try to do this in Python (by creating SQL selects for every table
and then parsing each return row into XML), but for it
I am trying to learn about argparse and how best to incorporate it into
my scripts. I am using Python 2.7.5 on Ubuntu 13.10.
It seems from the argparse tutorial that all the arguments are processed
as global variables. Is that the standard way to do it or do you
normally (when doing real
On 23/10/2013 22:12, Jackie Canales wrote:
let say i have a file with random letters of A, AB, C, CD, AC, A, D, CD, DD,
C, B, AB, CD, AB
How do i count the occurrence of each individual item.
def occurence(name):
infile = open('bloodtype1.txt', 'r')
lst = infile.read()
read()
Hello All,
Before starting to learn python, I first learnt C and C++ for a couple of
years. In C/C++, the choice to assign memory during compile time or during
execution time, i.e. assigning memory from the stack or the heap lay with the
programmer right? But in Python, I have only seen
On 24/10/2013 06:57, ivantham@raspberrypi wrote:
Hi, I'm new to programming. I'm using python 3 and Debian Linux. My
name is Ivan. I'm bad in for loops, I can't complete the following code:
Welcome to Python, and to the tutor newsgroup. This is the right place
to ask this sort of question.
On 24/10/2013 11:38, Paradox wrote:
I am trying to learn about argparse and how best to incorporate it into
my scripts. I am using Python 2.7.5 on Ubuntu 13.10.
Welcome to python, and to python-tutor mailing list. And thanks for
using text mode email, and for supplying both your Python
On Thu, Oct 24, 2013 at 12:38 PM, #PATHANGI JANARDHANAN JATINSHRAVAN#
jatinshr...@e.ntu.edu.sg wrote:
Hello All,
Before starting to learn python, I first learnt C and C++ for a couple
of years. In C/C++, the choice to assign memory during compile time or
during execution time, i.e.
On 24/10/2013 16:38, Paradox wrote:
I am trying to learn about argparse and how best to incorporate it into
my scripts. I am using Python 2.7.5 on Ubuntu 13.10.
It seems from the argparse tutorial that all the arguments are processed
as global variables. Is that the standard way to do it or
Hello,
And thank you for any help.
I am writing a little prog. On this part I need to recursively (preferably)
write to a list a value only if it's less than 49, else do an operation to
make it less than 49, then check which is the next available spot on the
list and write there ... so pseudo
Thank you for your replies. I suspect the solution is a bit more advanced
than where I'm at now, which is chapter 2 of a beginner's book. Not sure
why the author chose to use examples using money calculations when other
calculations that don't need rounding would have sufficed. I will have to
On 24/10/2013 12:38, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
Hello All,
Before starting to learn python, I first learnt C and C++ for a couple of
years. In C/C++, the choice to assign memory during compile time or during
execution time, i.e. assigning memory from the stack or the
On 24/10/13 17:38, #PATHANGI JANARDHANAN JATINSHRAVAN# wrote:
on. So, is there a concept of heap and stack in python or is it
abstracted?
Joel and Dave have given you the answers to this bit
And does python being an interpreted language have to do
anything with this?
Nothing at all.
And does python being an interpreted language have to do anything with
this?
I have to interrupt: you mean to say: And does the C implementation of
Python (CPython) have to do anything with this?. There are several
implementations of Python out there. Not all of them use an interpreter in
the
On Thu, Oct 24, 2013 at 9:37 AM, Shelby Martin shelby.mar...@gmail.comwrote:
Thank you for your replies. I suspect the solution is a bit more advanced
than where I'm at now, which is chapter 2 of a beginner's book.
Probably because talking about the gory details would completely derail the
On 10/24/2013 2:09 PM, Danny Yoo wrote:
Related: I saw a picture the other day on Google+ of an mailing
envelope whose zip code was written in scientific notation.
That;s odd - since ZIP codes are character, not integer,
--
Bob Gailer
919-636-4239
Chapel Hill NC
On 10/24/2013 12:50 PM, Dave Angel wrote:
Not sure which tutorial you're using, but the refernce page:
http://docs.python.org/3.3/library/argparse.html
Actually I am using 2.7.5, the tutorial found here:
http://docs.python.org/2/howto/argparse.html#id1
but the problem is the same.
Hej,
I can't get Python 3.3 up and running (it's properly installed but I can't
launch it), and I was wondering if anyone using OpenSUSE 12.3 had similar
issues. SUSE community folks weren't really able to help me, so I was
wondering I give it a try here.
Thanks,
Rafael
On Thu, Oct 24, 2013 at 2:25 PM, bob gailer bgai...@gmail.com wrote:
That;s odd - since ZIP codes are character, not integer,
It's not that odd. US Zip codes are a sequence of digits. I've
worked with plenty of databases where ZIP codes are held in Numeric
columns. It's not the ideal format
On Thu, Oct 24, 2013 at 11:25 AM, bob gailer bgai...@gmail.com wrote:
On 10/24/2013 2:09 PM, Danny Yoo wrote:
Related: I saw a picture the other day on Google+ of an mailing envelope
whose zip code was written in scientific notation.
That;s odd - since ZIP codes are character, not integer,
On Thu, Oct 24, 2013 at 1:21 PM, Marc Tompkins marc.tompk...@gmail.comwrote:
On Thu, Oct 24, 2013 at 11:25 AM, bob gailer bgai...@gmail.com wrote:
On 10/24/2013 2:09 PM, Danny Yoo wrote:
Related: I saw a picture the other day on Google+ of an mailing envelope
whose zip code was written in
hello, me again - the guy with a (mis)fortune of having to deal with a lot
of company's in and outgoing xml.I guess they just like xml as a data
interchange format, its human readable.i've done my task of exporting the
entire postgresql database to some prestructured xml, and i guess i've done
the
On Thu, 2013-10-24 at 21:57 +0200, Rafael Knuth wrote:
Hej,
I can't get Python 3.3 up and running (it's properly installed but I
can't launch it), and I was wondering if anyone using OpenSUSE 12.3
had similar issues. SUSE community folks weren't really able to help
me, so I was wondering I
On 2013-10-24 08:38, Paradox wrote:
I am trying to learn about argparse and how best to incorporate it
into my scripts. I am using Python 2.7.5 on Ubuntu 13.10.
It seems from the argparse tutorial that all the arguments are
processed as global variables. Is that the standard way to do it or
On 24/10/2013 23:45, Alex Kleider wrote:
On 2013-10-24 08:38, Paradox wrote:
I am trying to learn about argparse and how best to incorporate it
into my scripts. I am using Python 2.7.5 on Ubuntu 13.10.
It seems from the argparse tutorial that all the arguments are
processed as global
On 23/10/2013 21:42, Mauricio Villamil wrote:
Hello,
And thank you for any help.
Welcome to the python-tutor mailinglist.
Please use text emalis, not html. Your email program has lost all the
indentation below, making your program really hard to follow.
I am writing a little prog. On
On 24/10/2013 14:23, Paradox wrote:
On 10/24/2013 12:50 PM, Dave Angel wrote:
Not sure which tutorial you're using, but the refernce page:
http://docs.python.org/3.3/library/argparse.html
Actually I am using 2.7.5, the tutorial found here:
28 matches
Mail list logo