No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi How do you find out the first letter or number of string in a list? I have a list and I want to find whether any of the strings in the list start with a capital or little C. The code I have is: [ICODE] def isCMD(self): for word … |
|
Hi I am wondering how to write a list to an html file from scratch. I am currently writing it to a file using: [icode] def wpubooks(self): for i in booklist: s=str(booklist) f=open('/booklist', 'a') f.write(i + '\n') [/icode] Is there a way I can change that code so that it … |
|
Hi, I'm having a bit of a problem outputting to a file. I am trying to output each element of a list into a document on a new line and I can only get it to work when all the items in the list are on the same line. The … |
|
Hi I'm getting the error TypeError: argument of type 'int' is not iterable when i run my program and don't know where I'm going wrong. My code is: [ICODE] class loan: global loanlist loanlist = [] def loanbook(self, name, ISBN, author, title): self.name = name self.ISBN = ISBN self.author = … |
|
Hi I have certain number of books which each have an author, title and ISBN number. How is the best way I can store this so that when I want a list of the books I will be able to list the books with the title, author and ISBN number? … |
|
Hi, i'm having some trouble using the built-in apply function. I want to take a string in an external definition then apply definitions on it which are in a class. The code I have is: [ICODE] global msgstr def create_message(message, msgstr): if msgstr[0:3].upper() == 'CMD': return apply(message, (msgstr)) elif msgstr[0:3].upper() … |
|
Is there any way of finding words in a 10 x 10 grid, going horizontally and vertically? For example, if i had a text file with the following in: xxxplanexx xrxxxxxxxx xexxxxxyxx xdxxxxxexx xxxxxxxlxx xxxxxxxlxx xxxxxxxoxx xxxxxxxwxx xkingxxxxx xxxxxxxxxx how would you be able to find the words red and … |