Most viewed questions in Python

0 votes
1 answer

How to remove the last object from a list?

Hi, @Roshni, Try running the following piece of ...READ MORE

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

Python: Get current system/local time

You can use the datetime module for this. ...READ MORE

May 8, 2019 in Python by Suman
548 views
0 votes
1 answer

HI Mr / Mrs I have problem with my jupiter notebook when i try to learn Your video about Machine Learning. Can You help me please ?

Hi@Herlambang, I think you have a 32-bit system. ...READ MORE

Dec 18, 2020 in Python by MD
• 95,440 points
547 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
547 views
0 votes
1 answer

End tkinter program - python

You can use the destroy() to close ...READ MORE

Aug 9, 2019 in Python by Barbara
546 views
0 votes
1 answer

What does eval() in Python do?

The eval function lets a Python program ...READ MORE

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

Zip lists in Python

zip takes a bunch of lists likes a: ...READ MORE

Aug 22, 2018 in Python by Priyaj
• 58,090 points
546 views
0 votes
1 answer

Error in jarvis project (get url)

Hey, @Zodarlxx, Could you please post your error ...READ MORE

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

Open-Source Forum with API

phpBB would be the first that comes ...READ MORE

Mar 5, 2019 in Python by SDeb
• 13,300 points
545 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,090 points
544 views
0 votes
1 answer

Dimension in python numpy

Use the .shape to print the dimensions ...READ MORE

Apr 20, 2018 in Python by aayushi
• 750 points
544 views
0 votes
1 answer

Deleting a dictionary entry in Python

Use pop(): mapping.pop("key_x") #key_x is a key entry Note ...READ MORE

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

How to create a virtual environment to run a particular version of python?

Hi@akhtar To create a virtual environment, decide upon ...READ MORE

Jun 25, 2020 in Python by MD
• 95,440 points
541 views
0 votes
1 answer

How to create a unicode string in python with the string eg: This is a string?

Hey, @Roshni, It is very simple to execute, ...READ MORE

Jun 23, 2020 in Python by Gitika
• 65,910 points
541 views
0 votes
2 answers

Removing duplicates in lists

list(set(t + t2)) READ MORE

Feb 13, 2022 in Python by anonymous
540 views
0 votes
0 answers

joining two images reading from one folder

Hi, i am trying to generating joined ...READ MORE

Jan 3, 2021 in Python by shapna
• 120 points
540 views
0 votes
0 answers

how to remove overlapping boundaries in matplotlib?

how do i remove overlapping boundaries in ...READ MORE

Mar 26, 2019 in Python by Waseem
• 4,540 points
540 views
0 votes
1 answer

Read input of integers in Python

In the upper version of Python 3.x, raw_input was ...READ MORE

Oct 26, 2018 in Python by Priyaj
• 58,090 points
540 views
0 votes
0 answers

Function for factorial in Python

How can I compute an integer's factorial ...READ MORE

Feb 15, 2023 in Python by Arya
• 990 points
539 views
0 votes
1 answer

my Py Audio is not Downloading what should I do

Hello @S.P.D, First try to check your python ...READ MORE

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

How to use MySQLdb with Python and Django?

Hello @kartik, I had the same error and pip ...READ MORE

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

Importing Image

Hi@Amine, The error is because there is some ...READ MORE

Jun 25, 2020 in Python by MD
• 95,440 points
538 views
0 votes
1 answer

What are the best IDE/platform to write code in Python

Just as any other programming language, even ...READ MORE

May 28, 2019 in Python by Harsh
• 260 points
538 views
0 votes
1 answer

Reading server response from requests module in Python.

You can read the response using the text option ...READ MORE

May 14, 2019 in Python by Kunal
538 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
538 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
538 views
0 votes
1 answer

Pythonic Switch statement

You can implement it using dictionaries  def numbers_to_strings(argument): ...READ MORE

Jun 20, 2018 in Python by Nietzsche's daemon
• 4,260 points
538 views
0 votes
1 answer

Adding elements to a list in python

Use extend() instead: l = [5, 7, 12, ...READ MORE

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

why is the dcount and tcount 0 and 0 in the output?

Because the dcount and tcount variables you ...READ MORE

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

How to call an external command from Python?

Hi@akhtar, You can use the os module in ...READ MORE

Jun 25, 2020 in Python by MD
• 95,440 points
536 views
0 votes
0 answers

memory error in python

I am working on a  program that ...READ MORE

May 26, 2022 in Python by Kichu
• 19,050 points
535 views
+1 vote
1 answer

How do I use the data of an array after splitting it?

Hey, You can use  np.greater(b, f) np.greater_equal(b, f) np.less(b, f) np.less_equal(b, ...READ MORE

Dec 9, 2019 in Python by Payal
535 views
0 votes
1 answer

How to search for a word in a string in Python?

You can do it like this: txt = ...READ MORE

Apr 5, 2019 in Python by Kumar
535 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
535 views
0 votes
1 answer

Python IDE's that include graphical debuggers

There are three python IDE's that include ...READ MORE

Jun 7, 2019 in Python by Fez
534 views
0 votes
1 answer

Python: Doubt regarding private access specifier

In Python, you don't write to other ...READ MORE

May 23, 2019 in Python by Jagan
534 views
0 votes
1 answer

How can I open multiple files using “with open” in Python?

Hello @kartik, Just replace and with , and you're done: try: ...READ MORE

Dec 8, 2020 in Python by Niroj
• 82,880 points
533 views
0 votes
1 answer

How to get current time in Python?

Hi, You can use Datetime class. Input: import datetime datetime.datetime.now() Output: datetime.datetime(2019, 6, ...READ MORE

Jun 22, 2019 in Python by Taj
• 1,080 points
533 views
0 votes
1 answer

Find a file in python

you can use os.walk in the following ...READ MORE

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

How to sort dictionary by value python

This would work: d = sorted(data, key = ...READ MORE

Nov 2, 2018 in Python by Nabarupa
533 views
0 votes
1 answer

How to get the current time in Python

>>> import datetime >>> datetime.datetime.now() datetime(2018, 25, ...READ MORE

Jul 25, 2018 in Python by Frankie
• 9,830 points
533 views
+1 vote
1 answer

I have explained my scenario.Please suggest answer for this?

Hi @Vishal, You can simply use an if-else ...READ MORE

Jan 22, 2020 in Python by Kalgi
• 52,360 points
531 views
0 votes
1 answer

Join all strings in a list of strings

s = " ".join(myList) #here " " ...READ MORE

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

Python and Anaconda

Read this article and you will get ...READ MORE

Nov 12, 2018 in Python by Priyaj
• 58,090 points
530 views
0 votes
1 answer

What are namespaces in Python?

Namespace is basically a way to implement ...READ MORE

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

How to create the following pattern using Python?

Hi, @Roshni, You can use two for-loops for ...READ MORE

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

yield keyword in Python

The yield keyword is used along with ...READ MORE

Jul 9, 2019 in Python by Wajiha
• 1,950 points
529 views
0 votes
1 answer

Adding header to request using python requests module

You can use the headers option for that. Refer ...READ MORE

May 14, 2019 in Python by Ishan
529 views
0 votes
0 answers

how do i check the version of opencv?

it there a command to run in ...READ MORE

May 3, 2019 in Python by Waseem
• 4,540 points
529 views