Most viewed questions in Python

0 votes
0 answers

How to print square of first 100 natural numbers using iterations in python?

Can you make a program with nested ...READ MORE

Jul 22, 2019 in Python by Waseem
• 4,540 points
788 views
0 votes
1 answer

Django AllAuth gives SSLError

It can be fixed by replacing: client = ...READ MORE

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

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

Aug 31, 2018 in Python by charlie_brown
• 7,720 points
788 views
+1 vote
1 answer

Why is openpyxl is required for loading excel format files?

Well, it sounds like openpyxl is not ...READ MORE

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

How to traverse from a file to parse another file?

You use os.walk() module of python for ...READ MORE

Jan 2, 2019 in Python by Omkar
• 69,210 points
787 views
0 votes
1 answer

How can I use the sleep function in a python program?

You can use sleep as below. import time print(" ...READ MORE

Jun 10, 2020 in Python by anonymous
786 views
0 votes
1 answer

What is the purpose of Zope Interfaces?

You can actually test if your object ...READ MORE

Feb 28, 2019 in Python by SDeb
• 13,300 points
786 views
0 votes
1 answer

How to Print a List in Python

ou are using Python 2.x syntax with ...READ MORE

Aug 31, 2018 in Python by charlie_brown
• 7,720 points
786 views
0 votes
1 answer

How to find all the tags in the page using BeautifulSoup?

Try this code: for tag in soup.find_all(True): ...READ MORE

Apr 2, 2019 in Python by Soumya
785 views
0 votes
1 answer

How to print error in web browser if there is error in code?

You can try to catch these errors ...READ MORE

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

Check palindrome in Python

A pythonic way  and the most simplest ...READ MORE

Nov 14, 2018 in Python by Theodor
• 740 points
783 views
0 votes
1 answer

how to refer to a parent method in python?

If you know you want to use ...READ MORE

Apr 22, 2019 in Python by SDeb
• 13,300 points
781 views
+1 vote
1 answer

How can I map input to output without using dynamic()

Here am talking about my example you ...READ MORE

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

Why do variables have bigger scopes in Python than in C?

Only functions, modules, and the bodies of ...READ MORE

Jul 2, 2019 in Python by SDeb
• 13,300 points
779 views
0 votes
1 answer

dunder main in python

It is a check to see if ...READ MORE

Jun 21, 2018 in Python by Hamartia's Mask
• 1,580 points
778 views
0 votes
1 answer

What is twisted in python?

Twisted is a framework written in python, ...READ MORE

Aug 13, 2019 in Python by Mohammad
• 3,230 points
777 views
0 votes
1 answer

How to have values from a List1 into Columns Names and List 2 Values as Index for an Empty DataFrame

Try like this, it will give you ...READ MORE

Jul 10, 2019 in Python by Cherukuri
• 33,030 points
777 views
0 votes
1 answer

Python Math - TypeError: 'NoneType' object is not subscriptable

“TypeError: 'NoneType' object is not subscriptable” is ...READ MORE

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

can i get python interview questions pdf

Hey, @Navyboinpally, This is going to be very ...READ MORE

Apr 8, 2020 in Python by Gitika
• 65,910 points
775 views
0 votes
1 answer

Is there any way to write native apps for Windows, Blackberry, Android and Apple devices using Python?

Hi, This is an amazing Python framework just ...READ MORE

Jan 11, 2019 in Python by Nymeria
• 3,560 points
775 views
0 votes
5 answers

What to study in Python to do freelancing using this?

Hello, you are on the right track. ...READ MORE

Feb 27, 2019 in Python by Priyaj
• 58,090 points
774 views
+1 vote
2 answers

Multiple line comment in Python

Try this ''' This is a multiline comment. ...READ MORE

Jul 31, 2018 in Python by Priyaj
• 58,090 points
774 views
0 votes
1 answer

What does the dir() function do in python?

The dir() function returns all properties and methods of ...READ MORE

Aug 6, 2019 in Python by Mohammad
• 3,230 points
773 views
0 votes
1 answer

Ruby equivalent for Python's “try”?

Use this as an example: begin # ...READ MORE

Jul 29, 2019 in Python by SDeb
• 13,300 points
773 views
0 votes
1 answer

Speech Recognition and Python

you can use https://pypi.python.org/pypi/pygsr $> pip install pygsr example ...READ MORE

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

Meaning of 10j in SciPy

10j in b = np.r_[3,[0]*5,-1:1:10j] means that the ...READ MORE

Aug 27, 2019 in Python by Wajiha
• 1,950 points
772 views
0 votes
1 answer

Python if not == vs if !=

Using dis to look at the bytecode ...READ MORE

Jan 29, 2019 in Python by SDeb
• 13,300 points
771 views
0 votes
0 answers

TypeError: 'list' object is not callable in python

I am a beginner in Python, created ...READ MORE

Feb 3, 2022 in Python by Nandini
• 5,480 points
770 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
770 views
0 votes
1 answer

Create a circle turtle - Python

Hey its pretty simple. Try this out: food ...READ MORE

Jul 8, 2019 in Python by Manasa
768 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,090 points
767 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,090 points
767 views
0 votes
1 answer

Python - convert string to list

try states.split() this would help. READ MORE

Jul 20, 2018 in Python by Priyaj
• 58,090 points
767 views
0 votes
1 answer

How do you write a loop in python with conditional statements in python?

Lets say we have a problem statement ...READ MORE

Jul 8, 2019 in Python by Mohammad
• 3,230 points
764 views
0 votes
1 answer

OSX 10.11 with py2app?

Try this: In the directory of Sandwich.py (or ...READ MORE

Sep 6, 2018 in Python by Priyaj
• 58,090 points
764 views
0 votes
1 answer

How to find local IP addresses using Python's stdlib?

Hello @kartik, Try this out: import socket s = socket.socket(socket.AF_INET, ...READ MORE

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

What is Kivy?

Hey @Dipti, Kivy is an open source software ...READ MORE

May 31, 2019 in Python by Haseeb
763 views
+1 vote
2 answers

how can i do a binary search in python?

def Binary_search (array , element):       ...READ MORE

Jul 10, 2020 in Python by anonymous
• 240 points
763 views
0 votes
1 answer

I installed windows 10 through vmware workstation . I want to connect remote machine using python winrm im getting error

Hey, @Natraj, This basically means that no response ...READ MORE

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

Use two different programs in the third

You can treat each python file as ...READ MORE

Jan 24, 2020 in Python by Priya
761 views
0 votes
0 answers

Error: 'int' object is not subscriptable - Python

I was experimenting with a straightforward piece ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
760 views
0 votes
2 answers

how to use sum() in python?

sum()=sum all item in a tuple  syntax: sum(iterble,start) iterable required. The ...READ MORE

Mar 26, 2019 in Python by rajesh
• 1,270 points
760 views
0 votes
1 answer

Generator Expressions vs. List Comprehension

Generator expression resemble list comprehensions. List comprehensions ...READ MORE

Jul 15, 2019 in Python by Wajiha
• 1,950 points
759 views
0 votes
1 answer

How to check if a list is empty in python? [closed]

To check if a list is empty ...READ MORE

May 27, 2019 in Python by Nisa
• 1,090 points
759 views
0 votes
0 answers

how to do subsetting in python list?

how do i access values while subsetting ...READ MORE

Mar 15, 2019 in Python by Mohammad
• 3,230 points
759 views
0 votes
1 answer

How to duplicate IDs with Hive QL / Impala / Python

Based on your example, supposing id2 always ...READ MORE

Oct 1, 2018 in Python by Priyaj
• 58,090 points
759 views
0 votes
1 answer

How do you split a list into evenly sized chunks?

Here's a generator that yields the chunks ...READ MORE

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

How do you get a list of all the keys in a dictionary?

Hey, @Roshin, I would like to give you ...READ MORE

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

What are higher-order functions?

Higher-order functions are those functions that either ...READ MORE

Jul 25, 2019 in Python by Fata
• 1,050 points
757 views
0 votes
1 answer

What is the fucntion of mkdir -p in Python

mkdir -p gives you an error if the ...READ MORE

Oct 30, 2018 in Python by Priyaj
• 58,090 points
756 views