Trending questions in Python

0 votes
1 answer

Cannot make connection to .accdb file using python

That link has instructions for connecting to ...READ MORE

Oct 5, 2018 in Python by Priyaj
• 58,090 points
538 views
0 votes
1 answer

Behaviour of increment and decrement operators in Python

When you want to increment or decrement, ...READ MORE

Jul 26, 2018 in Python by Priyaj
• 58,090 points
3,566 views
0 votes
1 answer

Raw_Input() Is Not Defined

For Python 3.x, use input(). For Python 2.x, ...READ MORE

Sep 17, 2018 in Python by Priyaj
• 58,090 points
1,256 views
0 votes
1 answer

Existing key in Python

The intended way to check for the ...READ MORE

Oct 3, 2018 in Python by SDeb
• 13,300 points
540 views
0 votes
1 answer

how to use Binary tree search in Python

The key thing to notice is that ...READ MORE

Sep 27, 2018 in Python by Priyaj
• 58,090 points
762 views
0 votes
1 answer

Get the Current time in Python

To get the current date and time ...READ MORE

Oct 3, 2018 in Python by SDeb
• 13,300 points
490 views
+4 votes
6 answers

Substring search in Python

Use the "in" operator in python" if "substring" ...READ MORE

Apr 13, 2018 in Python by Nietzsche's daemon
• 4,260 points
958 views
0 votes
1 answer

How can I Get Laplacian pyramid using opencv

As far as I can see you ...READ MORE

Sep 4, 2018 in Python by Priyaj
• 58,090 points
1,723 views
0 votes
1 answer

How to use a global variable in function?

The global variable can be used in ...READ MORE

Sep 27, 2018 in Python by SDeb
• 13,300 points
712 views
0 votes
1 answer

How to replace id with attribute corresponding to id of another table?

Try looking the given link for better ...READ MORE

Oct 3, 2018 in Python by Priyaj
• 58,090 points
446 views
+1 vote
6 answers

How python trim works

You want strip(): myphrases = [ " Hello ...READ MORE

Oct 18, 2018 in Python by up4rescue
991 views
0 votes
1 answer

How to Reverse a list in Python

You can use the reversed function in ...READ MORE

Sep 29, 2018 in Python by SDeb
• 13,300 points
643 views
0 votes
1 answer

How to format strings in python?

To answer your first question... .format just seems more ...READ MORE

Oct 1, 2018 in Python by aryya
• 7,450 points
527 views
0 votes
1 answer

Conflicting dependencies of pypyodbc and blpapi

I figured out that pypyodbc only works ...READ MORE

Oct 4, 2018 in Python by Priyaj
• 58,090 points
395 views
0 votes
0 answers

Derivative of manipulated spline

I am using the InterpolatedUnivariateSpline function from ...READ MORE

Oct 4, 2018 in Python by eatcodesleeprepeat
• 4,710 points
380 views
0 votes
1 answer

Convert string list of dict from csv into JSON object in python

You can use the ast module Ex: import ast s = """[{'10': ...READ MORE

Sep 24, 2018 in Python by Priyaj
• 58,090 points
758 views
+1 vote
1 answer

How to use GUI that comes with Python to test your code?

Hey @alex0809, When your testing a website ...READ MORE

Sep 24, 2018 in Python by Vardhan
• 13,190 points
702 views
0 votes
1 answer

Reading powershell clixml in python

PowerShell's Extended Type System supports auxiliary properties ...READ MORE

Sep 21, 2018 in Python by charlie_brown
• 7,720 points
851 views
0 votes
1 answer

External command in Python

you can check the subprocess module in ...READ MORE

Oct 1, 2018 in Python by SDeb
• 13,300 points
433 views
+1 vote
1 answer

Run tally of events within a given period using datetime

If you have access to pandas, pd.Series.cumcount is one way. ...READ MORE

Sep 26, 2018 in Python by Priyaj
• 58,090 points
603 views
0 votes
1 answer

Crawling after login in Python

You missed a few login data forms, ...READ MORE

Sep 7, 2018 in Python by Priyaj
• 58,090 points
1,456 views
+1 vote
1 answer

What is the difference between range and xrange functions in Python 2.X?

xrange only stores the range params and ...READ MORE

Aug 22, 2018 in Python by Priyaj
• 58,090 points
2,100 views
+1 vote
1 answer

Can installin pip for python install dependencies aswell?

As long as the dependency is listed ...READ MORE

Sep 26, 2018 in Python by Priyaj
• 58,090 points
581 views
0 votes
1 answer

How does Python know whether a variable in the class is a method or a variable?

In python objects/variables are wrapped into methods ...READ MORE

Sep 18, 2018 in Python by aryya
• 7,450 points
951 views
+5 votes
1 answer

Places to work as Python Developer?

Check the below link for different companies ...READ MORE

Sep 25, 2018 in Python by Priyaj
• 58,090 points
450 views
0 votes
1 answer

How to check the version of Python?

you can check the version of python ...READ MORE

Sep 25, 2018 in Python by SDeb
• 13,300 points
618 views
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

Apr 11, 2018 in Python by hemant
• 5,790 points
3,479 views
0 votes
1 answer

How can I build a recursive function in python?

I'm wondering whether you meant "recursive". Here ...READ MORE

Sep 19, 2018 in Python by Priyaj
• 58,090 points
845 views
0 votes
1 answer

When I create and remove files rapidly on windows using python I get WindowsError (Error 5)

Here's the short answer: disable any antivirus or ...READ MORE

Aug 31, 2018 in Python by charlie_brown
• 7,720 points
1,667 views
0 votes
1 answer

Is there a way to run Python on Android?

YES! An example via Matt Cutts via SL4A -- "here’s ...READ MORE

Sep 19, 2018 in Python by Priyaj
• 58,090 points
830 views
0 votes
1 answer

Is there a string 'contains' in python?

In this case, you can use the ...READ MORE

Sep 25, 2018 in Python by SDeb
• 13,300 points
518 views
0 votes
1 answer

a basic question about “while true”

while True means loop forever. The while ...READ MORE

Jun 4, 2018 in Python by aryya
• 7,450 points
5,374 views
0 votes
1 answer

What's the difference in Qt between setVisible, setShown and show/hide

show() is just a convenience function for ...READ MORE

Apr 17, 2018 in Python by anonymous
7,449 views
0 votes
2 answers

Unable to use print statement in python3

print will work when you use print("Your ...READ MORE

Feb 14, 2019 in Python by Shashank
• 1,370 points
874 views
0 votes
1 answer

Print C format in Python

For printf- style formatting and special case ...READ MORE

Sep 18, 2018 in Python by SDeb
• 13,300 points
795 views
0 votes
1 answer

What is the difference between python's file I/O system when using 'w' and 'wb'?

Only in Windows, in the latter case, ...READ MORE

Sep 11, 2018 in Python by charlie_brown
• 7,720 points
1,176 views
0 votes
1 answer

Modify int in place

Use a list rather than a tuple: my_container ...READ MORE

Sep 14, 2018 in Python by Priyaj
• 58,090 points
939 views
0 votes
1 answer

Cannot make connection to .accdb file using python

key is just a variable name. for key in ...READ MORE

Sep 21, 2018 in Python by charlie_brown
• 7,720 points
619 views
0 votes
1 answer

Writing unit tests in Python: How do I start?

If you're brand new to using unittests, ...READ MORE

Sep 18, 2018 in Python by Priyaj
• 58,090 points
735 views
0 votes
1 answer

Python: how to print long text on different lines?

replace with a newline char. file.write(response.read().decode('utf-8').replace(";","\n")) In [72]: ...READ MORE

Sep 5, 2018 in Python by slayer
• 29,350 points
1,240 views
0 votes
1 answer

Balanced binary tree python

Instead of multiplying the number of nodes ...READ MORE

Sep 24, 2018 in Python by Priyaj
• 58,090 points
419 views
0 votes
1 answer

'Syntax Error: invalid syntax' for no apparent reason

You're missing a close paren in this ...READ MORE

Aug 13, 2018 in Python by Priyaj
• 58,090 points
2,230 views
0 votes
2 answers

difference between class and instance attributes

Apart from the performance, there is a ...READ MORE

Sep 17, 2018 in Python by SDeb
• 13,300 points
676 views
0 votes
1 answer

__init__ and self in python

The self variable represents an instance of ...READ MORE

Sep 18, 2018 in Python by SayantiniDeb
• 200 points
693 views
0 votes
1 answer

Comparing two files contents in python

This code should work for you: It ...READ MORE

Sep 21, 2018 in Python by Priyaj
• 58,090 points
528 views
+1 vote
1 answer

Quicksort in Python

The following code may solve your problem: def ...READ MORE

Sep 20, 2018 in Python by SDeb
• 13,300 points
527 views
0 votes
1 answer

Pointers in Python?

I want form.data['field'] and form.field.value to always have the same value This ...READ MORE

Sep 21, 2018 in Python by charlie_brown
• 7,720 points
492 views
0 votes
2 answers

how to print the current time using python?

print(datetime.datetime.today()) READ MORE

Feb 14, 2019 in Python by Shashank
• 1,370 points
688 views
0 votes
1 answer

comparing strings in Python using "==" or "is" [closed]

is is used for identity testing and ...READ MORE

Sep 19, 2018 in Python by SDeb
• 13,300 points
588 views
0 votes
1 answer

What is the difference between list and tuple?

Lists are mutable(values can be changed) whereas ...READ MORE

May 5, 2018 in Python by aayushi
• 750 points
6,524 views