Trending questions in Python

0 votes
3 answers

Best way to convert string to bytes in Python?

We can use the built-in Bytes class in Python ...READ MORE

Dec 28, 2020 in Python by David Samon
31,087 views
0 votes
0 answers

How do you move tree with ignore patterns in python

with the shutil.copytree I can copy an ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
1,241 views
0 votes
0 answers

Object Oriented Python for area of triangle

Write a Python Program(with class concepts) to ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
1,081 views
0 votes
1 answer

What is the full form of oops?

To answer your doubt, the programming paradigm ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,710 points
13,498 views
0 votes
0 answers

TclError: bad geometry specifier "200 x 100 + 300 + 250"

I get the error when attempting: root.geometry('200x100 + ...READ MORE

Dec 16, 2022 in Python by Chuck

edited Mar 4 41 views
0 votes
0 answers

Random word generator in Python

I'm essentially working on a project where ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
1,203 views
0 votes
0 answers

'for' loop in one line in Python

When I tried to use a for statement in ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
726 views
0 votes
0 answers

How can I find the first occurrence of a sub-string in a python string?

I'd like to locate the first index ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
663 views
0 votes
0 answers

How to exit the function if any error -python

i want to exit the code then ...READ MORE

Dec 8, 2022 in Python by anonymous

edited Mar 4 18 views
0 votes
0 answers

python reverse phone lookup with twilio

I've been trying to figure out how ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
665 views
0 votes
0 answers

how to make the output stop outputting when it is a precise rgb number?

I am a beginner using python so ...READ MORE

Dec 6, 2022 in Python by anonymous

edited Mar 4 16 views
0 votes
0 answers

Is it possible to get a list of keywords in Python?

I want to obtain a string list ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
533 views
0 votes
0 answers

How to check whether a variable is a class or not?

I was wondering how to check whether ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
489 views
0 votes
0 answers

How can I "count from the back" in python lists?

Say I have a list l = ['P','y','t','h','o','n'] I ...READ MORE

Nov 22, 2022 in Python by sarit
• 1,830 points
494 views
0 votes
0 answers

Repeating triangle pattern in Python

Depending on the integer input, I need ...READ MORE

Nov 24, 2022 in Python by sarit
• 1,830 points
477 views
0 votes
0 answers

Concatenating two one-dimensional NumPy arrays

How do I concatenate two one-dimensional arrays ...READ MORE

Nov 16, 2022 in Python by Ashwini
• 5,430 points
699 views
0 votes
0 answers

Python list error: step on slice with [:-1]

I believed I was familiar with the ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
637 views
0 votes
0 answers

How to define a two-dimensional array?

The following is how I want to d ...READ MORE

Nov 17, 2022 in Python by Ashwini
• 5,430 points
427 views
0 votes
0 answers

In Python, how do I declare an array?

In Python, how do I declare an ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
593 views
0 votes
0 answers

If I have multilabel admin register through API in Django, how do I show the users of each admin?

I'm using DRF for make API , ...READ MORE

Nov 28, 2022 in Python by Mohamed

edited Mar 4 17 views
0 votes
0 answers

In Python, what does a "r" mean before a string?

In Python, what does a "r" mean ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
461 views
0 votes
0 answers

What is the primary language used to create Python?

What is the primary language used to ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
389 views
0 votes
3 answers

import NumPy as np ImportError: No module named NumPy

You need to install numpy using pip install ...READ MORE

Dec 16, 2020 in Python by Roshni
• 10,480 points
35,898 views
0 votes
2 answers

Python Error: No python at 'C:\Users\dell\Appdata\Local\Programs\Python\Python37-32\python.exe'

follow these steps:- 1.open file ->setting -> interpreter ...READ MORE

Apr 30, 2021 in Python by Kiran Ahluwalia

edited Mar 5 31,302 views
0 votes
1 answer

ValueError: could not convert string to float: id

The problem is that in your code ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
8,894 views
0 votes
0 answers

Base language of Python

Since Python is merely a set of ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points

edited Mar 4 18 views
0 votes
0 answers

Find the minimum strength someone must have in the beginning so that he can cross N cells (Interview question)

Problem Statement: Mustafa wants to cross a dungeon. ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
2,418 views
0 votes
0 answers

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am facing an error when decoding ...READ MORE

May 9, 2022 in Python by Kichu
• 19,040 points
7,531 views
0 votes
1 answer

How to fix error "ERROR: Command errored out with exit status 1: python." when trying to install django-heroku using pip

Just add the package containing the executable pg_config. ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
7,969 views
0 votes
0 answers

Currency store in sorted form Python

Write a program If we have gorcery ...READ MORE

Oct 28, 2022 in Python by UF

edited Mar 4 16 views
0 votes
0 answers
+2 votes
2 answers

ModuleNotFoundError: No module named 'pyttsx3

Hi@akhtar, To avoid this error you have to ...READ MORE

Apr 24, 2020 in Python by MD
• 95,460 points
30,194 views
0 votes
0 answers

What does an 'r' represent before a string in python?

Why do we put a r before ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
776 views
0 votes
0 answers
0 votes
3 answers

Python error "NameError: name 'sr' is not defined"

write at start of code import speech_recognition as ...READ MORE

Mar 17, 2021 in Python by Honir

edited Mar 5 43,267 views
0 votes
0 answers

issues with ec2 instance tagging with python script

``` #!/usr/bin/env python3 import string import boto3 import sys import argparse instance_id = ...READ MORE

Oct 19, 2022 in Python by Tony

edited Mar 4 17 views
0 votes
0 answers

What is the meaning of "int(a[::-1])" in Python? [duplicate]

I don't get this at all. In ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
820 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
1,163 views
0 votes
0 answers

ValueError: Found input variables with inconsistent numbers of samples: [40002, 1573]

hi I want to try to classify ...READ MORE

Oct 16, 2022 in Python by anonymous

edited Mar 4 19 views
0 votes
0 answers

Base language of Python

What is the base language is Python ...READ MORE

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

How can I convert a list to a string using Python?

How can I convert a list to ...READ MORE

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

'python' is not recognized as an internal or external command [duplicate]

I recently got Python Version 2.7.5, and ...READ MORE

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

solve syntax error

self.var_name= StringVar()                  ^ SyntaxError: invalid syntax how to solve the ...READ MORE

Oct 10, 2022 in Python by anonymous

edited Mar 4 18 views
0 votes
0 answers

How to overcome timeout errors in web crawling?

My output keeps hanging indefinitely. What do ...READ MORE

Oct 9, 2022 in Python by Karthikah

edited Mar 4 19 views
0 votes
0 answers

Replacements for switch statement in Python?

I want to create a Python function ...READ MORE

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

Input In [18] t = int(c) + int(t) ^ IndentationError: expected an indented block

How can i correct this error as ...READ MORE

Oct 8, 2022 in Python by Muhammad

edited Mar 4 17 views
0 votes
0 answers

How to fetch dropdown value is available in side the frame using python?

The frame has no name and no ...READ MORE

Oct 7, 2022 in Python by anonymous

edited Mar 4 16 views
0 votes
0 answers

How do I sort a dictionary by value?

I have some dictionary of values that ...READ MORE

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

'str' object has no attribute 'decode'. Python 3 error?

'decode' is not an attribute of the ...READ MORE

Sep 21, 2022 in Python by Samuel
• 460 points
647 views