Trending questions in Python

0 votes
0 answers

raw_input function in Python

What is the raw_input function? Is it ...READ MORE

May 9, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 344 views
0 votes
0 answers

What do __init__ and self do in Python?

936 429 I'm learning the Python programming language and ...READ MORE

May 9, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 338 views
0 votes
0 answers

Replacements for switch statement in Python?

I want to write a function in ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,750 points
928 views
0 votes
0 answers

Extracting extension from filename in Python

Is it possible to extract the extension ...READ MORE

May 9, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 315 views
0 votes
0 answers

How to use the pass statement

What would be a simple/basic situation where ...READ MORE

Apr 19, 2022 in Python by Edureka
• 13,750 points
969 views
0 votes
0 answers

TypeError: 'int' object is not callable

gfdfghfhg READ MORE

May 8, 2022 in Python by Kichu
• 19,040 points

edited Mar 4, 2025 339 views
0 votes
0 answers

Does Python have a ternary conditional operator?

If Python doesn't have a ternary conditional ...READ MORE

Apr 19, 2022 in Python by Edureka
• 13,750 points
933 views
0 votes
0 answers

How to terminate a script?

How to terminate a script in python? READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
806 views
0 votes
0 answers

How do I execute a program or call a system command?

How do I call an external command ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,040 points
848 views
0 votes
0 answers

'python' is not recognized as an internal or external command

So I have recently installed Python Version ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,750 points
1,110 views
0 votes
0 answers

What do these operators mean (** , ^ , %, //)?

Other than the standard +, -, *and / operators; but what does ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 479 views
0 votes
1 answer

Sum a list of numbers in Python

So you want (element 0 + element ...READ MORE

Feb 14, 2022 in Python by CoolCoder
• 4,420 points
3,744 views
0 votes
0 answers

Unable to install pandas for python

I am trying to install pandas for ...READ MORE

May 2, 2022 in Python by Edureka
• 12,730 points

edited Mar 4, 2025 443 views
0 votes
0 answers

Python: % operator in print() statement

I just came across this Python code, ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,750 points
1,029 views
0 votes
0 answers

Python functions within lists

So I inquired about utilising a function ...READ MORE

Apr 12, 2022 in Python by Edureka
• 12,730 points
944 views
0 votes
0 answers

How can I take a message or command as user input to run a Python code

Is there any way where we can ...READ MORE

May 4, 2022 in Python by Sumana

edited Mar 4, 2025 327 views
0 votes
1 answer

DataFrame constructor not properly called! error

You are providing a string representation of ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
3,333 views
0 votes
0 answers

What does end=' ' exactly do?

So, I'm struggling trying to understand this ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 390 views
0 votes
0 answers

Static methods in Python?

Is it possible to have static methods ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 389 views
0 votes
0 answers

Remove 'b' character do in front of a string literal in Python 3

I am new in python programming and ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 373 views
0 votes
0 answers

Generate random integers between 0 and 9

How can I generate random integers between ...READ MORE

May 2, 2022 in Python by Edureka
• 12,730 points

edited Mar 4, 2025 370 views
0 votes
0 answers

Removing duplicates in lists

How do I get a new list ...READ MORE

May 2, 2022 in Python by Edureka
• 12,730 points

edited Mar 4, 2025 367 views
0 votes
0 answers

Is there a "not equal" operator in Python?

How would you say does not equal? Like if ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 358 views
0 votes
0 answers

How to calculate a mod b in Python?

Is there a modulo function in the ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 352 views
0 votes
0 answers

Is it possible to decorate classes?

Apr 24, 2022 in Python by Kichu
• 19,040 points
681 views
0 votes
0 answers

How do I count the occurrences of a list item?

Given an item, how do I count ...READ MORE

May 2, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 344 views
0 votes
0 answers

Base language of Python

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

Apr 18, 2022 in Python by Edureka
• 13,750 points
688 views
0 votes
1 answer

modulenotfounderror: no module named 'cv2'

Firstly, please do run these following commands ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,730 points
3,496 views
0 votes
0 answers

I am trying to get the sum of my list in python. This is my code:

import csv file1 = "Root/20Cent.txt" rows = [] result = ...READ MORE

Apr 24, 2022 in Python by kat

edited Mar 4, 2025 316 views
0 votes
0 answers

How to convert list to string

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

Apr 22, 2022 in Python by Edureka
• 13,750 points

reshown Mar 4, 2025 by Edureka 365 views
+1 vote
2 answers

ModuleNotFoundError: No module named 'selenium'

i fix the problem after installing go ...READ MORE

Nov 18, 2020 in Python by ahmed
25,791 views
0 votes
0 answers

How to reverse a list?

How do I iterate over a list ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 434 views
0 votes
0 answers

Converting Hex to RGB value in Python

How can one prompt the user to ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 380 views
0 votes
1 answer

What is the output of the following python code snippet?

for i in range(0, 10, 2):     if ...READ MORE

Feb 9, 2022 in Python by Nandini
• 5,480 points
3,256 views
0 votes
0 answers

Reverse a string in Python

There is no built in reverse function ...READ MORE

Apr 18, 2022 in Python by Edureka
• 13,750 points

edited Mar 4, 2025 333 views
0 votes
1 answer

What is the difference between driver.close() and driver.quit()?

close- This method is used to close ...READ MORE

Aug 20, 2021 in Python by anonymous

edited Mar 5, 2025 29,348 views
0 votes
0 answers

I want to unzip file from one folder to another folder in s3 using lambda function python.I have one code for this but in this code file are automatically repeated when we upload file

import json import boto3 from io import BytesIO import zipfile def ...READ MORE

Apr 15, 2022 in Python by anonymous

edited Mar 4, 2025 310 views
0 votes
0 answers

Testcase getting failed

def test_upload_file(client, tmp_path, set_mock_decrypty):     """     ...READ MORE

Apr 14, 2022 in Python by anonymous

edited Mar 4, 2025 331 views
0 votes
1 answer

TypeError: a bytes-like object is required, not 'str' when writing to a file in Python3

After what I observed, you would have ...READ MORE

Feb 11, 2022 in Python by Rahul
• 9,690 points
2,950 views
0 votes
0 answers

I am using same version of chrome webdriver and browser, but not able to open a particular url through selenium

I am using anaconda package to automate ...READ MORE

Apr 12, 2022 in Python by uma

edited Mar 4, 2025 349 views
0 votes
0 answers

How to convert [4.] to [1,0] (convert 1 number to 2 number )

I'm trying to separate 1 number to ...READ MORE

Apr 12, 2022 in Python by faroukbehl

edited Mar 4, 2025 350 views
0 votes
1 answer

What is the difference between tree depth and height?

To answer your question, you will have ...READ MORE

Feb 9, 2022 in Python by Rahul
• 9,690 points
2,920 views
0 votes
1 answer

Automatically create requirements.txt

You can use the following code to ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
2,331 views
+1 vote
3 answers

While using pyttsx 3 , I am having the following ERROR, i have installed pypiwin32

I got the same error "module not ...READ MORE

Aug 2, 2022 in Python by anonymous

edited Mar 5, 2025 11,399 views
0 votes
1 answer

How to change the “tick frequency” on x or y axis in matplotlib?

You could explicitly set where you want ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,730 points
20,131 views
0 votes
1 answer

Difference between python programing and scripting

Hi,@Sashi, Generally, all the scripting languages are considered ...READ MORE

Nov 27, 2020 in Python by Gitika
• 65,730 points
21,803 views
0 votes
2 answers

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

Hey,  @Himanshu. It's still most likely gzipped data. ...READ MORE

Jul 27, 2020 in Python by Gitika
• 65,730 points
27,240 views
0 votes
1 answer

'pip' is not recognized as an internal or external command, operable program or batch file.

You will have to add the path ...READ MORE

Feb 8, 2022 in Python by Soham
• 9,730 points
2,749 views
0 votes
1 answer

Sum a list of numbers in Python

Let us take a list of Numbers ...READ MORE

Feb 14, 2022 in Python by Nandini
• 5,480 points
2,459 views
0 votes
1 answer

'str' object does not support item assignment

In Python, strings are not very mutable ...READ MORE

Feb 22, 2022 in Python by Aditya
• 7,680 points
2,021 views