“inconsistent use of tabs and spaces in indentation”

I’m trying to create an application in Python 3.2 and I use tabs all the time for indentation, but even the editor changes some of them into spaces and then print out “inconsistent use of tabs and spaces in indentation” when I try to run the program. How can I change the spaces into tabs? … Read more

Program to Unjumble Words on Python [closed]

To accomplish this, you will need a database of viable words. An english dictionary will do. One way is to check for words in the database that are anagrams of the jumbled string. Here’s a naive algo: read the viable words into an appropriate data structure a python dict or tuple will suffice. Assume the … Read more

Python time.sleep() vs event.wait()

Using exit_flag.wait(timeout=DELAY) will be more responsive, because you’ll break out of the while loop instantly when exit_flag is set. With time.sleep, even after the event is set, you’re going to wait around in the time.sleep call until you’ve slept for DELAY seconds. In terms of implementation, Python 2.x and Python 3.x have very different behavior. … Read more

Difference between del, remove, and pop on lists

The effects of the three different methods to remove an element from a list: remove removes the first matching value, not a specific index: del removes the item at a specific index: and pop removes the item at a specific index and returns it. Their error modes are different too:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)