Trending questions in Python

+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
4,071 views
0 votes
1 answer

How to move searchbar in Plone5

You can install the add-on Products.ContentWellPortlets and ...READ MORE

Oct 10, 2018 in Python by Priyaj
• 58,020 points
557 views
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,020 points
768 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
1,308 views
+1 vote
6 answers

How python trim works

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

Oct 18, 2018 in Python by up4rescue
1,375 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,020 points
1,504 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,020 points
2,053 views
0 votes
1 answer

Why feed_dict is constructed when running epoch in PTB tutorial on Tensorflow?

Q1. feed_dict is used in this case to set ...READ MORE

Oct 3, 2018 in Python by Priyaj
• 58,020 points
801 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,020 points
1,056 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,020 points
750 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,020 points
3,760 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,460 points
840 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
732 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
8,005 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
658 views
0 votes
0 answers

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

Using SQLAlchemy, I can query a bunch ...READ MORE

Oct 3, 2018 in Python by eatcodesleeprepeat
• 4,710 points
706 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
921 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,020 points
1,030 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
843 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,020 points
2,394 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,020 points
873 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,150 points
945 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
659 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,020 points
831 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,020 points
1,676 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
1,267 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,020 points
1,364 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,020 points
1,143 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,460 points
1,166 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
512 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
1,011 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,020 points
651 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,529 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,912 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
795 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,993 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
1,125 views
0 votes
1 answer

Is there a way to run Python on Android?

YES! here’s a barcode scanner written in six ...READ MORE

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

How to install Python MySQLdb module using pip?

It's easy to do, but hard to ...READ MORE

Aug 20, 2018 in Python by charlie_brown
• 7,720 points
2,292 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
696 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
1,005 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
818 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
958 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,370 points
1,484 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,020 points
918 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,020 points
2,449 views
0 votes
1 answer

In LightFM does the training set need to be the same size as the test set?

I would change the wording. Often in ML, ...READ MORE

Sep 21, 2018 in Python by charlie_brown
• 7,720 points
748 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
840 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
884 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
710 views