Most viewed questions in Python

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
339 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
338 views
0 votes
0 answers

how can i read a text file in python?

can you specify the syntax and prequisites ...READ MORE

Apr 4, 2019 in Python by Waseem
• 4,540 points
338 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
337 views
0 votes
0 answers

Boolean comparison in Python

I am trying to print false using ...READ MORE

Sep 17, 2018 in Python by ana1504.k
• 7,910 points
337 views
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
336 views
0 votes
1 answer

How do you use a variable in a regular expression?

Instead of using the /regex/g syntax, you can construct ...READ MORE

Nov 26, 2020 in Python by Gitika
• 65,910 points
336 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
336 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
336 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
336 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
335 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
334 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
334 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
333 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
333 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
333 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
332 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
331 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
331 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
329 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
328 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
328 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
328 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
327 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
325 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
325 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
324 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
324 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
324 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
324 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
324 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
323 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
323 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
323 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
322 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
322 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
322 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
321 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
321 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
320 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
320 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
319 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
318 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
318 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
317 views
0 votes
1 answer

Build python on Unix

Fork the CPython repository to your GitHub account and get ...READ MORE

Jun 6, 2019 in Python by Fez
317 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
317 views
0 votes
0 answers

i'm not able to install numpy,time packges in phy charm

Oct 8, 2021 in Python by Sampath
• 120 points
316 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
316 views
+1 vote
1 answer

Add Variables to Tuple

Use the following piece of code: ...READ MORE

Jul 4, 2019 in Python by Wajiha
• 1,950 points

edited Jul 5, 2019 by Kalgi 316 views