Re: [Tutor] Add elements to list and display it [Very newbie question]

2009-03-02 Thread Network Administrator
ylist[0]) > print type(mylist[1]) > > #print the list of items > for i in mylist: > print i > > *When you run the program:* > Enter num or text: 27 > Enter num or text: Eric > > > 27 > Eric > > > On Fri, Feb 27, 2009 at 10:19 AM, Network Adminis

[Tutor] Add elements to list and display it [Very newbie question]

2009-02-27 Thread Network Administrator
I am beggining to learn Python and I appreciate if you help me with this: "I want a piece of a program to request the user to input "elements" (numbers, text, etc) and store them into a list. Then, I want to display all the elements one-per-line." I started using this code: #!/usr/bin/env python

[Tutor] Python & MySQL... Define port.

2009-02-09 Thread Network Administrator
Hello everybody! I want to use Python to query a given MySQL database. However, this database is running on port 3308, instead the traditional 3306. I read that (example): MySQLdb.connect(host="dbserv', db='inv', user='smith') can be used to query a given database; however, it didn't work in m