Most answered questions in Python

0 votes
2 answers

what is a class method in python?

Class Method  class method is the method which is ...READ MORE

Apr 8, 2019 in Python by MrBoot
• 1,190 points
964 views
0 votes
2 answers

what is null in python?

In python no primitive data types. python treats as ...READ MORE

Mar 13, 2019 in Python by rajesh kumar
1,065 views
0 votes
2 answers

argparse argument order

Using Pisa will serve your needs.. READ MORE

Feb 28, 2019 in Python by Pratosh kumar
801 views
0 votes
2 answers

How to add a certain time delay to the code using Python?

You can use time.sleep(duration in second) READ MORE

Feb 14, 2019 in Python by Shashank
• 1,370 points
844 views
+1 vote
2 answers

Python convert XLS and XLSX file to csv

XLSX tables are usually created in MS ...READ MORE

Aug 30, 2019 in Python by Mian Tanzeel
17,208 views
+1 vote
2 answers

Python convert extracted excel file to csv

Some services require table data in CSV ...READ MORE

Aug 30, 2019 in Python by Mian Tanzeel
6,498 views
0 votes
2 answers

Difference between sort and sorted

when to use which? Use list.sort when you ...READ MORE

Mar 26, 2020 in Python by rahul
• 360 points
4,295 views
+1 vote
2 answers

python nmap can't find PortScanner attribute

you want install        1.pip uninstall nmap        2.pip install python-nmap in ...READ MORE

Jan 25, 2020 in Python by Rangertech_hacker234
8,022 views
0 votes
2 answers

Python UnboundLocalError error while executing script

Inside your function when you say word=word+1, ...READ MORE

May 22, 2020 in Python by Ibrahim Nezar
• 140 points
1,542 views
0 votes
2 answers

How can I write code to find a palindrome in python without using string functions?

x="malayalam" y="" for i in x: ...READ MORE

Nov 3, 2020 in Python by Thangaraj
22,036 views
0 votes
2 answers

Help me solve the code

The fetchone() method fetches the result of ...READ MORE

Jan 9, 2019 in Python by Omkar
• 69,210 points
670 views
0 votes
2 answers

Equivalent of a?b:c in Python

result = "F" if(isfemale_bit) else "M" print(result) Try this ...READ MORE

Dec 15, 2019 in Python by Manel
3,784 views
0 votes
2 answers

Removing Title bar in Tkinter program

you can remove the title bar by ...READ MORE

Mar 19, 2019 in Python by anonymous
19,269 views
0 votes
2 answers

How to use virtual environment in Python?

venv (for Python 3) and virtualenv (for Python 2) allow ...READ MORE

Aug 25, 2020 in Python by Pistle
• 300 points
478 views
0 votes
2 answers

How can I get the count of a list in Python?

n=[1,2,3,4,5,6,7,8,9] print(len(n)) =9 READ MORE

Dec 10, 2020 in Python by anonymous
1,167 views
0 votes
2 answers

Need help using PYTHONPATH

PYTHONPATH only affects import statements, not the top-level Python interpreter's ...READ MORE

Dec 17, 2018 in Python by iangregor
• 300 points
868 views
+1 vote
2 answers

Best Python Programming Courses

you can also check http://letsfindcourse.com/python for best ...READ MORE

May 15, 2019 in Python by anonymous
580 views
0 votes
2 answers

Error: Speech to Text Codec cannot decode the bytes in position

import speech_recognition as sr r = sr.Recognizer() audio ='C\Users\Desktop\audiofile1.wav' with ...READ MORE

Nov 28, 2018 in Python by Nabarupa Das
2,415 views
0 votes
2 answers

Is Python fully object oriented?

Python supports all the concept of "object ...READ MORE

Sep 13, 2020 in Python by Anjali Chauhan
17,426 views
+1 vote
2 answers

Speech (audio file, wav) to Text - getting timed out

I think the error you are getting ...READ MORE

Nov 27, 2018 in Python by Omkar
• 69,210 points
4,997 views
0 votes
2 answers

How can I rename multiple files in a certain directory using Python?

import os from optparse import OptionParser, Option class MyOption ...READ MORE

Jul 29, 2020 in Python by The real slim shady
4,422 views
–1 vote
2 answers

How to filter out any digit that contains odd number in a range of number in Python?

n = list(range(10)) b = list(filter(lambda i:i%2!=0,n)) print(b) READ MORE

Oct 1, 2019 in Python by Nomizo_Coders
1,750 views
0 votes
2 answers

How to implement Stack in python

There are different method to implement stack ...READ MORE

Jun 21, 2020 in Python by pagarsach
• 160 points
1,104 views
+3 votes
2 answers

What does Python _init_ and self do?

Hey @Anirudh!  Self The self keyword is used to access ...READ MORE

Oct 31, 2018 in Python by Omkar
• 69,210 points
5,979 views
+1 vote
2 answers

Difference: abstract class and interface in Python

If abstract class contains only abstract methods ...READ MORE

Jun 21, 2019 in Python by anonymous
7,260 views
0 votes
2 answers

Check a number is Prime or not in Python

There is an efficient way to write ...READ MORE

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

Why do we use return statement in python?

def maximum(x, y):     if x > y:     ...READ MORE

Apr 4, 2019 in Python by anonymous
1,700 views
0 votes
2 answers

Calling an external command in Python

import os os.system('external_command') Replace external_command in the above code ...READ MORE

Oct 16, 2018 in Python by Omkar
• 69,210 points
774 views
0 votes
2 answers

In Python, how do I read a file line-by-line into a list?

readline function help to  read line in ...READ MORE

Jun 21, 2020 in Python by sahil
• 580 points
1,436 views
0 votes
2 answers

Clear Screen in Python

pip3 install clear-screen and then: from clear_screen import clea ...READ MORE

Jan 28, 2019 in Python by Zong
832 views
+2 votes
2 answers

Job roles for Python

Hey, Python Developer responsibilities include writing and testing ...READ MORE

May 16, 2019 in Python by Gitika
• 65,910 points
882 views
+7 votes
2 answers

I want to build a recommender system incorporating diversity and accuracy in the recommender engine.

I dont know what exactly you are ...READ MORE

Sep 24, 2018 in Python by slayer
• 29,350 points
1,517 views
+3 votes
2 answers

How do I install pip on Windows?

pip is already installed if you are ...READ MORE

Nov 2, 2018 in Python by Priyaj
• 58,090 points
956 views
0 votes
2 answers

How do I connect to a MySQL Database in Python?

connect mysql database with python import MySQLdb db = ...READ MORE

Mar 28, 2019 in Python by rajesh
• 1,270 points
1,578 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
668 views
0 votes
2 answers

Avoiding multiple nested for-loops in python

Instead of multi-loop, If you can categorize ...READ MORE

Sep 15, 2018 in Python by pedro67657
• 160 points

edited Sep 15, 2018 by Vardhan 15,606 views
0 votes
2 answers

How can I install external binaries using portable python

0110100001000101001010101001011010100100111100101001 READ MORE

Jan 24, 2019 in Python by anonymous
1,745 views
0 votes
2 answers

How do play audio (playsound) in background of Python script?

There’s an optional second argument, block, which ...READ MORE

Jun 8, 2019 in Python by anonymous
26,782 views
0 votes
2 answers

NameError: name 'raw_input' is not defined

Hi, There may a problem with your python ...READ MORE

Jun 25, 2020 in Python by MD
• 95,440 points
31,752 views
+1 vote
2 answers

Does 'finally' always execute in Python?

The "finally" executes almost everytime. But there ...READ MORE

Aug 31, 2018 in Python by Omkar
• 69,210 points
5,398 views
0 votes
2 answers

In List of Dicts, find min() value of a common Dict field

lst = [{'price': 99, 'barcode': '2342355'}, {'price': ...READ MORE

Aug 31, 2018 in Python by Omkar
• 69,210 points
7,229 views
0 votes
2 answers

How to create new folder?

import os try: os.makedirs(path) except ...READ MORE

Aug 31, 2018 in Python by Omkar
• 69,210 points
593 views
+1 vote
2 answers

Remove all whitespace in a string in Python

You can also use regular expressions for ...READ MORE

Aug 31, 2018 in Python by Omkar
• 69,210 points
16,818 views
+1 vote
2 answers

How to use the pass statement in Python

In Python programming, pass is a null statement. The ...READ MORE

Apr 5, 2019 in Python by anonymous
753 views
+1 vote
2 answers

Python string formatting: % vs. .format

Using Python format() function is what the ...READ MORE

Apr 11, 2019 in Python by Dasa Ravi
976 views
+1 vote
2 answers

How to convert list to string

mylist = [1, 2, 3] ‘’.join(map(str, mylist)) ==> ...READ MORE

Aug 21, 2018 in Python by Omkar
• 69,210 points
672 views
0 votes
2 answers

Replacements for switch statement in Python?

The recommended path for Python 3.10 which ...READ MORE

Feb 9, 2022 in Python by Soham
• 9,700 points
580 views
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

Mar 29, 2019 in Python by rajesh
• 1,270 points
1,556 views
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

Aug 5, 2018 in Python by Omkar
• 69,210 points

edited Aug 8, 2018 by Omkar 7,609 views
+1 vote
2 answers

Static methods in Python?

Static methods are used when we need ...READ MORE

Aug 4, 2018 in Python by Ronaldobessmin
• 160 points

edited Aug 4, 2018 by Vardhan 703 views