Wednesday, 21 August 2013

How to add a whole list of elements into one list?

How to add a whole list of elements into one list?

This is my code. I have to add a whole list of things
here:(http://pastebin.com/u5S0rF9D) into a list, how do I do that? this is
my excel file that I imported into python
(https://docs.google.com/spreadsheet/ccc?key=0Atza5UMAhSHRdHJMWGZqZlRrZWpySnU1SHhKOXFlN2c#gid=0)
What do I "append" into the maleList?
import random
gender = raw_input("Enter your character gender (Male/Female): ")
start = raw_input("Enter Please enter starting letter of name(A to B): ")
import csv
readerFileHandle = open("Book1.csv", "rb")
malenames = csv.reader(readerFileHandle)
for row in malenames:
y = []
for x in row:
if x[-1] == '\xa0':
y.append(x[:-2])
else:
y.append(x)
for z in y:
print z
maleList = []
maleList.append()
print maleList
readerFileHandle.close()

No comments:

Post a Comment