Most viewed questions in Python

0 votes
1 answer

What to do ?

Hello @Aashi, pd_csv.(...) the dot after csv For more information ...READ MORE

Oct 6, 2020 in Python by Niroj
• 82,880 points
358 views
0 votes
0 answers

How to stop threads spawned by BaseHTTPServer using ThreadingMixing

I read a post somewhere that using ThreadingMixin (from the SocketServer module), ...READ MORE

Oct 24, 2018 in Python by Aryya
• 500 points
358 views
0 votes
0 answers

how to show all the Xticks ??

how to show all the Xticks? I have ...READ MORE

Sep 28, 2020 in Python by dhoni
• 120 points
357 views
0 votes
0 answers

How can we save the extracted file in a specified folder?

While extracting the data using python selenium, ...READ MORE

Nov 7, 2019 in Python by moumita
• 120 points
357 views
0 votes
0 answers

Avoiding the case sensitivity in python

I need to make the code below ...READ MORE

Apr 22, 2022 in Python by Edureka
• 13,620 points
356 views
0 votes
1 answer

What does the “yield” keyword do?

To understand what yield does, you must understand what generators are. ...READ MORE

Dec 16, 2020 in Python by Gitika
• 65,910 points
356 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
355 views
0 votes
1 answer

Sphinx: local conf for a page?

As far as I know there's no ...READ MORE

May 27, 2019 in Python by SDeb
• 13,300 points
355 views
0 votes
1 answer

Deleting list elements

Use pop(): a = [1, 2, 3, 4] a.pop(2) print(a) Now ...READ MORE

Apr 23, 2018 in Python by Nietzsche's daemon
• 4,260 points
354 views
0 votes
0 answers

How to know which Python is running in Jupyter notebook?

I am using jupyter notebook and I ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
353 views
0 votes
0 answers

How to sort two different lists with same common value?

list1 = [ ["name1", 100], ["name2", 33], ...READ MORE

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

Connect to two databases

If you don't specify the database in ...READ MORE

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

How do I list all files of a directory?

Hii, Try this: import os os.listdir("somedirectory") Thank you!! ...READ MORE

Nov 18, 2020 in Python by Niroj
• 82,880 points
352 views
0 votes
0 answers

How do you create a new class instance using class method in python?

What is the function of super() in ...READ MORE

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

Searching for substrings

Use the in operator to do this. If ...READ MORE

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

How can I get a list of locally installed Python modules?

Do not use with pip > 10.0! My ...READ MORE

Nov 26, 2020 in Python by anonymous
• 65,910 points
351 views
0 votes
1 answer

How can we install python in RHEL using CLI?

Run the following command: sudo yum install python3 This ...READ MORE

Jun 23, 2020 in Python by Tanay Singh
351 views
0 votes
0 answers

What should I do with "Unexpected indent" in Python?

How do I rectify the error "unexpected ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
350 views
0 votes
0 answers

hello guys i need help to make this code run plz !

H= float (input("Is this circuit charging& ...READ MORE

Nov 25, 2020 in Python by anonymous
• 120 points
350 views
0 votes
1 answer

Why not inherit from List<T>?

There are some good answers here. I ...READ MORE

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

How I can remove day and time from TimeStamp?

You can follow the below given: '{:%Y-%m}'.format(dt.strptime(str(key), '%Y-%m-%d ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
350 views
0 votes
0 answers

Is game development good in python?

What are the tools and libraries for ...READ MORE

Jul 26, 2019 in Python by Waseem
• 4,540 points
349 views
0 votes
0 answers

How do I update/upgrade pip itself from inside my virtual environment?

I'm able to update pip-managed packages, but ...READ MORE

Dec 21, 2022 in Python by erzan
• 630 points
348 views
0 votes
0 answers

Help, How can I fix this? TypeError: Getting error as __init__() got an unexpected keyword argument 'rotaion_range'.

datagen = ImageDataGenerator(zoom_range=0.2,rotaion_range=10,width_shift_range=0.1, height_shift_range=0.1,horizontal_flip=True, vertical_flip = False ...READ MORE

Oct 20, 2021 in Python by anonymous
• 120 points
348 views
0 votes
0 answers

Trying to get a graph where if manufacturer is GHI, need to find all the products related to GHI

Trying to get a graph where if ...READ MORE

Jun 3, 2019 in Python by anonymous
348 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 in Python by Ali
347 views
0 votes
0 answers

Print series of prime numbers in python

I want to print a series of ...READ MORE

Apr 25, 2022 in Python by Kichu
• 19,050 points
347 views
0 votes
0 answers

Why do I get "List index out of range" when trying to add consecutive numbers in a list using "for i in list"?

Given the following list a = [0, 1, ...READ MORE

Apr 24, 2022 in Python by Kichu
• 19,050 points
346 views
0 votes
1 answer

Does Python have a string 'contains' substring method?

You can use in operator to access ...READ MORE

Feb 16, 2022 in Python by Nandini
• 5,480 points
346 views
0 votes
0 answers

is there a way to run android using python?

can you give a few sample projects ...READ MORE

Apr 22, 2019 in Python by Waseem
• 4,540 points
345 views
0 votes
0 answers

How do I convert a datetime to date?

How do I convert a datetime.datetime object ...READ MORE

May 24, 2022 in Python by Kichu
• 19,050 points
344 views
0 votes
1 answer

How can I add new keys to a dictionary in Python?

Yes, it is possible to add new ...READ MORE

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

Python Online Training

learn python at H2K Infosys and master ...READ MORE

Aug 7, 2020 in Python by swapna
• 120 points
1 flag 344 views
0 votes
0 answers

how to use linalg condition in python

Aug 2, 2019 in Python by teja
344 views
0 votes
1 answer

Inverting a python dictionary

inv_dict = {value: key for key, value ...READ MORE

May 23, 2018 in Python by Nietzsche's daemon
• 4,260 points
344 views
0 votes
0 answers

If in Python I put a list inside a tuple, can I safely change the contents of that list?

The value inside the tuple is simply ...READ MORE

Apr 26, 2022 in Python by Edureka
• 13,620 points
343 views
0 votes
1 answer

How to add properties while installing GOTO?

You can follow a few steps: click advanced ...READ MORE

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

Python releases announcements

Hey @Gargi, all releases are announced on ...READ MORE

Jun 6, 2019 in Python by Trisha
343 views
0 votes
0 answers

what is the purpose of the argument 'end' in the print function?

is it necessary to use this argument ...READ MORE

May 9, 2019 in Python by Waseem
• 4,540 points
343 views
0 votes
1 answer

There are some Error so resolve quickly

Hi@Aditya, It is working fine in my python ...READ MORE

Dec 9, 2020 in Python by MD
• 95,440 points
342 views
0 votes
1 answer

syntaxerror: "unexpected character after line continuation character in python" math

The division operator is /, not \ READ MORE

Feb 16, 2022 in Python by CoolCoder
• 4,400 points
341 views
0 votes
1 answer

“Least Astonishment” and the Mutable Default Argument

Actually, this is not a design flaw, ...READ MORE

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

Is Brython client side?

Brython itself seems to be completely client ...READ MORE

Jan 4, 2019 in Python by SDeb
• 13,300 points
341 views
0 votes
1 answer

Python while sampling

I would say, this could be your ...READ MORE

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

How can I capitalize the first letter of each word in a string?

The .title() method of a string (either ASCII or ...READ MORE

Feb 18, 2022 in Python by CoolCoder
• 4,400 points
340 views
0 votes
1 answer

How to call an external command?

Hello @kartik, Look at the subprocess module in the standard ...READ MORE

Nov 18, 2020 in Python by Niroj
• 82,880 points
340 views
0 votes
1 answer

Can anyone help to write a regular expression to fetch TEST:31275 from the below text?

Try using the following expression: Grep -o "TEST:d+" ...READ MORE

Jun 25, 2020 in Python by Nipul Aglawe
340 views
0 votes
0 answers

what is the use of visual studio 2015 tool in python?

What purpose would it serve being a ...READ MORE

Jun 7, 2019 in Python by Waseem
• 4,540 points
340 views
0 votes
0 answers

Print without space in python 3

I'm new to Python, and I'm wondering ...READ MORE

Dec 22, 2022 in Python by erzan
• 630 points
339 views
0 votes
1 answer

Convert the keys of a dictionary to list

Unpacking with * works with any object ...READ MORE

Feb 7, 2019 in Python by Omkar
• 69,230 points
339 views