Trending questions in Python

0 votes
1 answer

Command python execinterminal icon not found

When the "command Python execInTerminal" icon or ...READ MORE

Nov 29, 2023 in Python by anonymous
• 3,360 points
2,516 views
0 votes
3 answers

Python exit commands - why so many and when should each be used?

The functions* quit(), exit(), and sys.exit() function in the same way: ...READ MORE

Dec 14, 2020 in Python by Gitika
• 65,770 points
67,048 views
0 votes
2 answers

Do we have pointers in python like other programming languages?

From one point of view, everything is a pointer in Python. Your ...READ MORE

Dec 16, 2020 in Python by Gitika
• 65,770 points

edited Jul 8, 2021 by Sarfaraz 62,749 views
0 votes
1 answer

Sum of prime numbers from m to n in python

def is_prime(number):     if number < 2:         return False     for i ...READ MORE

Jan 5, 2024 in Python by Ali
1,118 views
0 votes
1 answer

How to Concatenate Lists in Python?

In Python, you can concatenate lists using ...READ MORE

Dec 29, 2023 in Python by Anu
855 views
0 votes
1 answer

What does // means in Python?

In Python, when you use //, it ...READ MORE

Dec 29, 2023 in Python by Vani
888 views
0 votes
3 answers

AttributeError: 'numpy.ndarray' object has no attribute 'append'

for root, dirs, files in os.walk(directory): ...READ MORE

Dec 12, 2020 in Python by Rajiv
• 8,870 points
53,273 views
0 votes
1 answer

How to find an element in Pandas Dataframe?

You can do it like this: Suppose df is ...READ MORE

Apr 8, 2019 in Python by Tina
74,910 views
0 votes
1 answer

How to install Tensorflow in pycharm ?

For installing TensorFlow your system must be ...READ MORE

Jun 23, 2020 in Python by Varsha Kumari
54,816 views
+1 vote
4 answers

Python: convert txt file to csv format with rows and columns

Python will read data from a text ...READ MORE

Dec 14, 2020 in Python by Gitika
• 65,770 points
57,899 views
0 votes
1 answer

Why am I getting the syntax error SyntaxError invalid syntax in a line that contains fully valid syntax?

A "SyntaxError: invalid syntax" is a common ...READ MORE

Oct 18, 2023 in Python by anonymous
• 3,360 points
1,068 views
0 votes
1 answer

/usr/bin/env: ‘python’: No such file or directory

Hi@akhtar, It seems your python script is not ...READ MORE

Sep 20, 2020 in Python by MD
• 95,460 points
49,344 views
0 votes
0 answers

Python shopping cart add to cart, get total get num items

I want to loop through the list ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,040 points
23,648 views
0 votes
1 answer

What do "init" and "self" do in python ?

In Python, `init` and `self` are related ...READ MORE

Oct 5, 2023 in Python by anonymous
• 3,360 points
1,034 views
+1 vote
7 answers

What do you mean by python scripting? What is a script and a module in python?

A module is a file containing a ...READ MORE

Jun 17, 2019 in Python by Zain Abbas
65,330 views
0 votes
1 answer

Python urllib2 login to minecraft net

Why not use Selenium over urllib? Selenium ...READ MORE

Sep 25, 2023 in Python by Rajarshi
• 470 points
620 views
0 votes
0 answers

root = tk.TK() ERROR, i dont get why ???

import tkinter as tk from tkinter import ttk # ...READ MORE

Oct 3, 2023 in Python by anonymous

edited 5 days ago 15 views
0 votes
0 answers

How do I install opencv using pip?

I need to install cv2 for a ...READ MORE

Sep 13, 2023 in Python by Rahul
• 240 points
836 views
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers

In Python, retrieve color palettes from the website ColorHunt.co.

I am presently engaged in the development ...READ MORE

Sep 12, 2023 in Python by Satyawrat
• 460 points
522 views
0 votes
0 answers

I'm making a Python program to do math, figure out answers, and so on, but I'm getting the syntaxerror: "unexpected character after line continuation character in python."

This is my code: print("Length between sides: "+str((length*length)*2.6)+" ...READ MORE

Sep 7, 2023 in Python by Satyawrat
• 460 points
628 views
0 votes
0 answers

How to find the number of a list item ?

Given a list ["foo", "bar", "baz"] and ...READ MORE

Sep 11, 2023 in Python by Satyawrat
• 460 points
389 views
0 votes
0 answers
0 votes
0 answers

How to use the open with statement to open a file

I'm researching file input and output in ...READ MORE

Sep 6, 2023 in Python by Satyawrat
• 460 points
568 views
0 votes
0 answers

What do the three different types of brackets in Python code mean? I'm not sure if this is right, so if I'm wrong, please tell me:

[] - Normally used for dictionaries, list items () - ...READ MORE

Sep 11, 2023 in Python by Satyawrat
• 460 points
346 views
0 votes
0 answers

What is print(f"...")

I'm looking at a Python script that ...READ MORE

Sep 18, 2023 in Python by Satyawrat
• 460 points

edited 5 days ago 16 views
0 votes
0 answers
0 votes
0 answers

What is print(f"...") ?

I'm looking at a Python script that ...READ MORE

Sep 18, 2023 in Python by Satyawrat
• 460 points

edited 5 days ago 9 views
0 votes
0 answers

I have a very long list of datetime strings like these:

["Jun 1 2005 1:33PM", "Aug 28 1999 ...READ MORE

Sep 7, 2023 in Python by Satyawrat
• 460 points
433 views
0 votes
0 answers

How do I use Python to change YOLO format comments to x1, y1, x2, y2 coordinates?

I want to know how to change ...READ MORE

Sep 16, 2023 in Python by Satyawrat
• 460 points

edited 5 days ago 9 views
0 votes
0 answers

How to sort a dictionary using key?

Example input: {2:3, 1:89, 4:5, 3:0} Desired output: {1:89, 2:3, ...READ MORE

Sep 4, 2023 in Python by Satyawrat
• 460 points
503 views
0 votes
0 answers

What does %s in a Python format string mean?

For example, in the below code if len(sys.argv) ...READ MORE

Sep 5, 2023 in Python by Satyawrat
• 460 points
467 views
0 votes
0 answers

How does super() operate in the presence of multiple inheritance? As an example, consider the following:

class First(object): def __init__(self): ...READ MORE

Sep 6, 2023 in Python by Satyawrat
• 460 points
396 views
0 votes
0 answers

Is it okay for general applications to use the RuntimeError exception?

raise RuntimeError('config file is missing host address') I've ...READ MORE

Sep 7, 2023 in Python by Satyawrat
• 460 points
304 views
0 votes
0 answers

What do the python file extensions, .pyc .pyd .pyo stand for?

What do these python file extensions mean? .pyc .pyd .pyo What ...READ MORE

Sep 12, 2023 in Python by Rahul
• 240 points

edited 5 days ago 17 views
0 votes
0 answers

If I want to find the sum of a number's numbers, such as:

Input: 932 Output: 14, which is (9 + 3 + 2) What ...READ MORE

Sep 11, 2023 in Python by Satyawrat
• 460 points

edited 5 days ago 9 views
0 votes
0 answers
0 votes
0 answers

Python urllib2 login to minecraft.net

I have a doubt. I'm creating a ...READ MORE

Aug 31, 2023 in Python by Edureka
• 220 points
445 views
0 votes
0 answers

What do __init__ and self do in Python? [duplicate]

During my Python lectures, I've come across a ...READ MORE

Aug 31, 2023 in Python by Edureka
• 220 points
374 views
0 votes
0 answers

How to sum the values of a JavaScript object?

I'd like to sum the values of ...READ MORE

Sep 1, 2023 in Python by Edureka
• 220 points
262 views
0 votes
2 answers

What's the difference between %s and %d in Python string formatting?

The reason is that they are using ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,680 points
23,550 views
0 votes
1 answer

KeyError: "['Place'] not found in axis"

I think you had click on run ...READ MORE

Mar 1, 2021 in Python by Bulky

edited 4 days ago 41,276 views
0 votes
1 answer

What is the difference between read() and readline() in python?

The read() will read the whole file at ...READ MORE

Apr 28, 2022 in Python by narikkadan
• 63,600 points
17,472 views
+1 vote
2 answers

What is the difference between .py and .pyc files in Python?

Hi, @Roshni, You can follow a few steps ...READ MORE

Jun 23, 2020 in Python by Gitika
• 65,770 points
34,493 views
0 votes
0 answers

I want something related to python.

#  Don't change the code below print("Welcome ...READ MORE

May 14, 2023 in Python by Krishna

edited 5 days ago 13 views
0 votes
3 answers

TypeError: Index(...) must be called with a collection of some kind, 'Email' was passed

It is not working because your code ...READ MORE

May 13, 2020 in Python by anonymous

edited May 13, 2020 by Gitika 55,672 views