No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
Re: Hi atsuko, Here is my version of a word finder. It has some serious limitations (it cannot search for words such as "It's" or anything like that due to the punctuation), and it cannot search for multiple words at one time, but at least in my tests it could find … | |
Hey everyone, This is a problem I have been having with my keyboard. Whenever I attempt to press up arrow + left arrow + button, the third button does not work. The keyboard I am using is the standard HID keyboard that comes with a Dell computer and all of … | |
Re: [QUOTE=SoulMazer;696386]Thanks for all the info guys, except vegaseat, what would be the use of saving the dictionary to a file? Is it for if I wanted to say create a menu that had the option of using one list or another?[/QUOTE] I think the advantage is you can edit the … | |
Re: [code] class: FileCheck(object): def checkFiles(install_vers=None, uninstall_vers=None): if uninstall_vers != None or install_vers != None: if uninstall_vers != None: for ver in uninstall_vers: print "checking %s" % ver if install_vers != None: for ver in install_vers: pass print "done" if __name__ == "__main__": check = FileCheck() check.checkFiles(uninstall_vers=["1.0","1.3"]) [/code] Hi asciiman, Two … | |
Re: Hey inkcoder, There is a slight problem with the code you posted. You posted: [code=python] test = raw_input(">") test = test2.replace('a', '1') print test2 [/code] I believe you wanted: [code=python] test = raw_input(">") test2 = test.replace('a', '1') print test2 [/code] I think that should produce the desired response. | |
Re: Let's use the cmath module for an example. If you import cmath, there are two variables: e and pi. If you type: [ICODE]>>> print pi[/ICODE] You get the following error in IDLE: [code=python]Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> print pi NameError: name 'pi' is not … | |
Re: [QUOTE=kittensaretasty;624931]I'm a complete beginner. I know how to get things to print to the screen, with the print command. But I want to be able to input a string of text and have that text returned in all caps. Do I do this with an argument to the print command … | |
Re: Here was my solution to the problem: [code]word = 'cake' cakeList = [] mixedList = ["cake", 12, "cakecar", "cAKe", "orange", "apple", "1cake", "cake1"] for x in mixedList: if word in str(x).lower(): cakeList.append(x) print cakeList[/code] With the output: [ICODE]['cake', 'cakecar', 'cAKe', '1cake', 'cake1'][/ICODE] Each element in mixedList is searched for the … |
The End.