904 Posted Topics
Re: Try to generalize this approach: [code=python]matrix3x3 = [range(1, 4), range(4, 7), range(7, 10)] print matrix3x3 # [[1, 2, 3], [4, 5, 6], [7, 8, 9]] [/code] | |
Re: Argentina used to have 1200% annual inflation rate. It wouldn't take long to create trillionairs. | |
Re: Very fanny indeed! My computer goes on slow down strike, and I have to stick money onto the CD tray to speed it up. | |
Re: I remember in 2003 Fox News announced that the US Army had found a large chemical weapons plant in Iraq. It turned out to be storage shed for agricultural chemicals. Fox News never retracted their assertions. | |
| |
Re: [QUOTE=Zelores;559130]thanks for all the help everyone! it really helped me. im still a noob when it comes to programming, espically to python. its just to bad that after this quarter i wont be working with python anymore. its all java and c++ lol.[/QUOTE]Hehe, every computer student has to go through … | |
Re: [QUOTE=EnderX;551035]If you're going to reference that, then please get the point right. One, it wasn't an apple, and two, Eve ate it first. Adam's crime was that he [I]knew[/I] what it would do, and he neither stopped Eve, nor refused it himself.[/QUOTE]Here I thought that Eve ate Adam's apple. That … | |
Re: You would have to make sure that the string does not have several equal letter pairs. Note that strings are immutable. so you have to convert the string into list of letters to do the actual swapping and convert back to string, easy to do. | |
Re: The simplest way is to use the dictionary: [code=python]# print the control characters of an ASCII table ... controls_dic = { 1: 'SOH', 2: 'STX', 3: 'ETX', 4: 'EOT', 5: 'ENQ', 6: 'ACK', 7: 'BEL', 8: 'BS', 9: 'HT', 10: 'LF', 11: 'VT', 12: 'FF', 13: 'CR', 14: 'SO', 15: … | |
Re: What this world really needs is one dust powered vehicle. Hehe, I could power it up in my room. | |
Re: You can do it with label and use spaces of the desired background colour. Here is example: [code=python]# Tkinter progress bar experiment # using label and string of spaces import Tkinter as tk root = tk.Tk() # width 300 and height 100, no offsets root.geometry("300x100+0+0") space = " " s … | |
Re: Pull the power cord, wrap clear tape around one of the prongs, plug it back in. About 67% of the users will never figure it out. | |
| |
Re: I like wine, for refreshing drink I mix red table wine with fruit juices. | |
Re: Please use code tags with your code to preserve the indentations. Otherwise the code is very difficult to read and not too many folks will help. [noparse][code=python][/noparse] your Python code here [noparse][/code][/noparse] This will put your error message into the cmd window: [code=python]# took Jeff's code to create error import … | |
Re: Use something like the DrPython IDE, that one has its own output window. Also editors like ConText have option that allow you to keep the cmd window open. | |
Re: "Bumsfeld" in the oil exploration business is a field of oil wells with a large content of natural gas. | |
Re: But then you lose any credibility and you will become not liked, at least by me. You must be joshing. | |
Re: Jeff's suggestion is modern Python. Make sure that your number is iterated as string: [code=python]squaredigits = lambda x: sum([int(i)*int(i) for i in str(x)]) print squaredigits(442) # --> 36 [/code] Note: filter(), map() and reduce() will go away with Python30 [code=python] # add this to future code try: filter and map … | |
Re: I would stick with the Lichtenstein bankers, they are more secretive. They administer hundreds of tax deductable foundations that you can donate money to, but in reallity is simply your own account. Just imagine, you donate and later can get your money back with a nice gain. It's the perfect … | |
Re: The French used torture tactics in Algeria extensively and still lost the war. | |
Re: Well, used car salesperson getting me stuck with one lemon car is more immediate then politician getting my grandchildren stuck with trillions of dollars/euros in debt. | |
![]() | Re: [QUOTE=~s.o.s~;528587]Is it February already? Damn...[/QUOTE]I like your dry sense of humour! Glad to see you moderate here! |
Re: Back to the topic at hand: Félicitation Serunson from South East England! | |
Re: [QUOTE=jbennet;527001]any old way yeah[/QUOTE]My sentiments too! | |
Re: [QUOTE=Ancient Dragon;531680]Don't you know you can't buy your way to heaven ?[/QUOTE]It all depends what you belief! Martin Luther spoiled it all. I would establish city on the moon for scientists, dreamers and poets. | |
Re: Half full bottle of Beaujolais, will be empty soon. | |
Re: Whoever jbennet is, Girl come before God in the dictionary. Also, God made Man first and then perfected his efforts to make Girl. You just got to love 'em! | |
Re: Import module os and use os.path.getsize(filename) to check if file is empty. | |
Re: I think that China will eventually flex its muscles and "blow you to bits"! | |
Re: Python is portable across a large umber of Operating Systems, so when you use OS calls, the error returned is specific for the particular OS used and generated by that OS. It would be tough for the developers of Python to cross reference all these different error numbers. | |
Re: Wonder what they put on the window? Very cute though! | |
Re: I like to see the following label on my pillow: "Under Penalty of Law this Tag not to be Removed!" | |
Re: Yeah MidiMgic, great talent there! I am still working on your questions. | |
| |
Re: Baseball is hot in Japan and most of Central America too. Football looks like a harmless war and might be something more strictly North American. | |
Re: If you buy your bottled water in plastic bottles, expect one fair amount of chemical contamination! Even glass bottles have been found to be contaminated with benzene (does cause cancer) from the bottle's plastic cap seal. | |
Re: Looking foreward to another dry turkey, yams, pumpkin pie and green tea at my mother's house. | |
Re: [QUOTE=Lardmeister;473788]Back to the topic: Can anyone suggest to me what avatar to use? I am thinking Donald Duck right now. In the words of our great leader: "Bring it on!"[/QUOTE]Waylon Smithers from the Simpsons would be a good match for you. | |
Re: I agree with MidiMagic, the name calling is very immature! Most countries in Europe take about 50% taxes from you, and people have gotten used to it. For that we get free healthcare too! | |
Re: [QUOTE=outdatedtech;474068]I gave a intro and now I'm just wandering the board. To bad there's no beer.[/QUOTE]This is a nice forum, enjoy it! | |
Re: Lol, very nice! Keep going with your interesting finds!!! | |
The End.