Is there a ways to merge two similar dictionaries, and what happens if the key words clash?
Is there a ways to merge two similar dictionaries, and what happens if the key words clash?
I can not figure out the order of dictionary keys, they seemed not to be sorted. Any insight?
Getting C and C++ all mixed is common!
I have use the space/tab feature too, but don't always know how many spaces each tab is.
You need to give somewhat more info, like operating system? What have you actually tried? Are your looking for IDLE file that starts the editor?
I knew there had to be a way to avoid these global variables, I am still learning a lot, generator functions are somewhat confusing right now!
Does Python have something like peek(memory) and poke(memory) of other languages that read and write to memory addresses directly?
**rambling**
man python is great. you can do such nice stuff with next to no code, or programming experience.
--- and it is so easy to experiment with the codes!
You may want to use shutil.copy(sourcefile, destinationfile), it gives copy the current date, shutil.copy2(sourcefile, destinationfile) gives the date of the file you copy.
What are the ways to find substring in string in Python? Which way is most effiecient?
Looks like your turtle figures out the left and right side of box, but not top and bottom. Could this be because the way if evaluates your and statement? If y is false it doesn't bother with x.
Mawe, I put your suggestions into program and they work well!
Thank you much.
Just started with Python so i am using 2.4
Sorry, awe might not be the corrected word. I am impressed how you get idea and quickly know how to tackle with Python! I feel weak there. Maybe my brains is too saturated with C.
I looked at you updated project2.py.
Looks like you mixed space and tabs, got that fixed.
Random is imported but never used.
Don't you need line to start program?
What is range of steps, 1000 to 5000?
This is pretty complex programming. You are leaving me in awe! Where do you get the idea in first place?
I always learn that the use of global variables is to be discouraged. Is this the only way to copy static variable behaviour in Python?
What is the best way to sort a list of words with the case insensitive?
I hear a lot about PyGame for writing games and that I understand is SDL in a Python coat. Is DirectX used in a similar fashon? Any examples?
Is it wastefull to throw in an extra header file that may not be needed. Does it add much to the size of the final file, or does the compiler catch it?
Address zero would not be an absolute address, or is it? Otherwise, what does it mean? I am confused now.
I need to write about a half one page instruction string for one of my C++ programs. How do I do this best, so I can read it in the code and easly update it later. I have tried concatinating, but that makes corrections tough on the wrapping edge.
Silly logic indeed.
A processor does run raw binary code!
Is const void* p the same as a null pointer? Why would i use it?
I have read the tutorial about Python and JPEG here, but there si no mention about showing the actual picture!
I am astonished how little classes basic Python modules uses. I thought it was more of a OO language.
It works and gives much information, thank you muchly!
I understand that PyGame is simply a wrapper for SDL. That creates a problem, Python has a good memory manager, but SDL written in C++ has the usual memory management is up to you thing. THESE TWO WORLDS LIKE TO CLASH AND CRASH!
Don't forget to multiply your centimeters by 0.033 to get the height in feets!
I hope the spelling isn't too far off, but what is list comprehension statement and why would one use it?
I know that lambda is some kind of function in Python. What does it do? Why would one use it?
I am just starting to look at writing class in Python. Can a class that I write inherit Python calendar?
Does anyone have a meaningfull example of the use of the Profiler included in Python?
Thinking about the way it's done with C on Windows, and that you have to create an certain .exe file and then rename to .scr
This might be not doable in Python since it does not make .exe file.
Also looks like it might be highly specific to the operating system you have.
I don't think Python is better than C++, but you can do thinks at a higher level with it.
Build a Memory Game. You shortly flash up a number of random words. Lets say three or five, and then ask the player to recall the words from a mutli choice answer. Do that a ten or twenty times and then rate the player.
They could be numbers too, but I think words are more fun.
This is kind of neat:
# assigning the same value to several variable names:
a = b = c = 7
print( a ) # 7
print( c ) # 7
# contents of local dictionary ...
print( vars() ) # {'a': 7, 'c': 7, 'b': 7, ... }
I have read vegaseat's "Projects for the Beginner" sticky and got really interrested in the eqaution solver for physics or mathematics problem. I just need a little Python hint how to get this started.
Thank you muchly shanenin,
that looks like exactly what I wanted! I will have to play with all the great information there to get familiar with it.
Is there a way one can interrupt the sleep() function with a key press in Python?
I know Python has adopted Java's decorator, but I can not make much sense from the reference manual example. It would be nice if soemone could give a good example of the implimentation of a Python function decorator.
Python is relatively new to me. I have mostly programmed in C and C++. I read that Python has a good build-in debugger, but I can not understand the information in the reference manual. Can anybody please give an actual commented example how this works.
Super job Micko! Why don't you post it right here, or better even in the Python snippetts.
Vegaseat, Micko gave the correct answer to CutCrusader's question. Your answer with the zero x in front does not.
Wouldn't it be safer to use fgets() rather then scanf()?
I am still mostly using C. I know this probably a little bit old fashioned. I am following Python conversation closely too, looks like a interesting language to me. Does not have many many { and } and ;
I thinks IDLE uses Tkinter (TCL) and that is more internationally than PyWin's wxPython based code.
If you want portability of your code on the internet, don't use these special characters. I have the same problem with other non-english characters too.