Most viewed questions in Python

0 votes
0 answers

Switching between Python 3.7 and 3.8 under Anaconda

What is the rationale for having two ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
344 views
0 votes
1 answer

How do I get the number of elements in a list

items = [] items.append("apple") items.append("orange") items.append("banana") len(items) #use the ...READ MORE

Feb 15, 2022 in Python by Dev
• 6,000 points
344 views
0 votes
1 answer

There are some Error so resolve quickly

Hi@Aditya, It is working fine in my python ...READ MORE

Dec 9, 2020 in Python by MD
• 95,440 points
344 views
0 votes
1 answer

How to call an external command?

Hello @kartik, Look at the subprocess module in the standard ...READ MORE

Nov 18, 2020 in Python by Niroj
• 82,880 points
344 views
0 votes
1 answer

Convert the keys of a dictionary to list

Unpacking with * works with any object ...READ MORE

Feb 7, 2019 in Python by Omkar
• 69,230 points
344 views
0 votes
0 answers

What does super() do in python?

How does it help in multiple inheritance? READ MORE

Sep 6, 2019 in Python by Waseem
• 4,540 points
342 views
0 votes
0 answers

What is the use of cursor while querying a sqlite database?

I am completely new to sqlite, and ...READ MORE

Jul 4, 2019 in Python by Waseem
• 4,540 points
342 views
0 votes
0 answers

What are different libraries for SOAP in python?

Is the documentation present for those libraries? READ MORE

Jun 24, 2019 in Python by Waseem
• 4,540 points
342 views
0 votes
1 answer

Which is better if we compare C vs Python?

It depends on what do you expect ...READ MORE

Mar 6, 2019 in Python by SDeb
• 13,300 points
342 views
0 votes
1 answer

What is Python division

You're using Python 2.x, where integer divisions ...READ MORE

Oct 17, 2018 in Python by Priyaj
• 58,090 points
342 views
0 votes
0 answers

problem in sklearn

from sklearn.model_selection import train_test_split is not working ...READ MORE

Mar 9, 2020 in Python by Manjunath
• 120 points
341 views
0 votes
0 answers

How can you print the date in a regular format in python?

Is there a module or package in ...READ MORE

Jun 18, 2019 in Python by Waseem
• 4,540 points
341 views
0 votes
0 answers

How can you preserve timezone information in python?

What is the use of strfttime()  and ...READ MORE

Jun 13, 2019 in Python by Waseem
• 4,540 points
341 views
0 votes
1 answer

Getting the last element of a list

some_list[-1] is the shortest and most Pythonic. In fact, ...READ MORE

Dec 3, 2020 in Python by anonymous
• 65,910 points
340 views
0 votes
1 answer

How do I integrate Ajax with Django applications?

Hello @kartik, You don't have to change your ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,880 points
340 views
0 votes
1 answer

cmd showing the interpreter error and version 3.7 showing?

You can add python3.8 in the environment ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,910 points
339 views
0 votes
1 answer

How to install pip?

'pip' is not recognized as an internal ...READ MORE

Nov 6, 2020 in Python by anonymous
• 65,910 points
338 views
0 votes
1 answer

El return solo me devuelve False en este método

Hola amiga como estas La función no devuelve ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,910 points
338 views
0 votes
1 answer

Applications built using Python

Python is suitable for almost all possible ...READ MORE

Nov 13, 2018 in Python by SDeb
• 13,300 points
338 views
0 votes
1 answer

How to delete a file or folder?

os.remove() removes a file. os.rmdir() removes an empty directory. shutil.rmtree() deletes a ...READ MORE

Dec 7, 2020 in Python by Gitika
• 65,910 points
337 views
0 votes
1 answer

Why doesn't the button display below the message?

You can make use of the given ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
337 views
0 votes
1 answer

Parse date string and change format

Use datetime module. it can help you change the ...READ MORE

Apr 25, 2022 in Python by narikkadan
• 63,700 points
336 views
0 votes
1 answer

Reverse a string in Python

To reverse a string in Python we ...READ MORE

Feb 15, 2022 in Python by Dev
• 6,000 points
336 views
0 votes
1 answer

print the character from string if character is alphabet

You can use str.isalpha() For example: s = 'a123b' for ...READ MORE

Sep 18, 2020 in Python by Roshni
• 10,520 points
336 views
0 votes
1 answer

How can I optimize this condition so that it takes less time to execute in Python Pandas.

Hello @moli, You can easily optimize this code ...READ MORE

Sep 8, 2020 in Python by Niroj
• 82,880 points
336 views
0 votes
0 answers

what is a bitwise operator in python?

can you show some operations using bitwise ...READ MORE

Apr 8, 2019 in Python by Waseem
• 4,540 points
336 views
0 votes
1 answer

convert integer to strings

Yes, you can str() function. For example: a=10 str(a) output-' ...READ MORE

Jun 26, 2018 in Python by code.reaper12
• 3,500 points
334 views
0 votes
1 answer

Returning values in python

Place your values in a tuple and ...READ MORE

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

How to convert list to string

To convert list to string in Python ...READ MORE

Feb 9, 2022 in Python by Dev
• 6,000 points
333 views
0 votes
0 answers

is there a difference between django and python?

can you give some major differences? READ MORE

May 8, 2019 in Python by Waseem
• 4,540 points
333 views
0 votes
1 answer

Support vector Regresson

Hi,@ Manoj, I would suggest you go through ...READ MORE

Nov 9, 2020 in Python by anonymous
• 65,910 points
332 views
0 votes
0 answers

What is the procedure to list all the files in the directory?

How am i supposed list all the ...READ MORE

Jun 14, 2019 in Python by Waseem
• 4,540 points
330 views
0 votes
1 answer

Uninstalling python packages

It is best to install pip in ...READ MORE

May 9, 2018 in Python by Nietzsche's daemon
• 4,260 points
329 views
0 votes
1 answer

Type checking in Python

Use the type() function with the variable ...READ MORE

May 8, 2018 in Python by Nietzsche's daemon
• 4,260 points
329 views
0 votes
0 answers

How can I download Anaconda for python 3.6

I am working on a  Tensorflow object ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
328 views
0 votes
0 answers

Python Key Error=0 - Can't find Dict error in code

basically I have been racking my brains ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
327 views
0 votes
1 answer

How do I pass a variable by reference?

Hello, Just wrap it in a list: def Change(self, ...READ MORE

Nov 18, 2020 in Python by Niroj
• 82,880 points
327 views
0 votes
1 answer

Can someone tell me what this line of code does?

Hey, Your above-asked query means: Confidence loads one ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,910 points
327 views
0 votes
0 answers

What is the use of get requests in python?

What are the other http requests in ...READ MORE

May 30, 2019 in Python by Waseem
• 4,540 points
327 views
0 votes
1 answer

How to determine a Python variable's type?

Use the type() builtin function: >>> i = 123 >>> type(i) <type ...READ MORE

Dec 2, 2020 in Python by Gitika
• 65,910 points
326 views
0 votes
1 answer

How to connect my app to mongo?

Most users try to use NoSQL-like DBs ...READ MORE

Nov 12, 2020 in Python by Gitika
• 65,910 points
326 views
0 votes
1 answer

How do I use method overloading in Python?

It's method overloading, not method overriding. And in Python, ...READ MORE

Jan 4, 2023 in Python by Elton
• 400 points
325 views
0 votes
1 answer

How to give local path instead of media URL?

If u are using iframe, you can ...READ MORE

Nov 12, 2020 in Python by Gitika
• 65,910 points
325 views
0 votes
0 answers

What is the technique to get plain text output using a simple templating system?

Can you give an example using html ...READ MORE

Jun 10, 2019 in Python by Waseem
• 4,540 points
325 views
0 votes
0 answers

Python vs Cpython

What exactly is CPython and how does ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
324 views
0 votes
1 answer

Does Python have a string 'contains' substring method?

You can use the in operator: if "blah" not in ...READ MORE

Nov 26, 2020 in Python by Gitika
• 65,910 points
324 views
0 votes
1 answer

How I can find array in array?

I guess the given below will b ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
324 views
0 votes
1 answer

How do I parse XML in Python?

Hello @kartik, You can use BeautifulSoup: from bs4 import BeautifulSoup x="""<foo> ...READ MORE

Nov 19, 2020 in Python by Niroj
• 82,880 points
323 views
0 votes
0 answers

how to do round of an integer in python?

is there a function or method that ...READ MORE

Apr 3, 2019 in Python by Waseem
• 4,540 points
321 views
0 votes
1 answer

Python debugging tips

You can use the pdb module, insert ...READ MORE

Oct 26, 2018 in Python by SDeb
• 13,300 points
321 views