Most answered questions in Python

0 votes
1 answer

Can't use read() for html2text?

decode() the content with the charset sent inside ...READ MORE

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

Populate QComboBox with a list

It looks like you're using the old ...READ MORE

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

What is the purpose of hash function in python?

The hash() method returns the hash value of an object if it ...READ MORE

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

Why is Seaborn better than Mtaplotlib?

Factually, Matplotlib is good but Seaborn is ...READ MORE

Jul 3, 2019 in Python by Wajiha
• 1,950 points
379 views
0 votes
1 answer

How to check if a given string matches a particular pattern in Python?

You can use re module of python ...READ MORE

Jul 3, 2019 in Python by Neel
• 3,020 points
1,014 views
0 votes
1 answer

What does AF_INET mean?

AF_INET refers to Address from the Internet ...READ MORE

Jul 3, 2019 in Python by Wajiha
• 1,950 points
4,014 views
0 votes
1 answer

Is it possible to print all the modules imported in a python script?

Since I am using Python 3.6, I ...READ MORE

Jul 3, 2019 in Python by Neel
• 3,020 points
2,939 views
0 votes
1 answer

How to change tuple's existing elements?

Hi Priyankar, I understand your problem, but Tuple is immutable - ...READ MORE

Jul 2, 2019 in Python by sampriti
• 1,120 points
2,599 views
0 votes
1 answer

How to find exponent of a number in Python?

Yes you can do it using the ...READ MORE

Jul 2, 2019 in Python by Arvind
• 3,040 points
2,092 views
0 votes
1 answer

How do i install numpy on windows?

Python Package Index (PyPI) is a repository ...READ MORE

Jul 3, 2019 in Python by anonymous
514 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
795 views
0 votes
1 answer

Slicing a list using a variable, in Python

Yes its possible. Use the following piece ...READ MORE

Jul 2, 2019 in Python by Wajiha
• 1,950 points
1,743 views
0 votes
1 answer

What does the operator "/=" do in python?

x = 20 res = x /= 5 print(res) The ...READ MORE

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

What are raw string literals?

A raw string literal opens with a sequence of ...READ MORE

Jul 31, 2019 in Python by Mohammad
• 3,230 points
654 views
+1 vote
1 answer

Converting integers to strings

Yes you can convert integers to strings ...READ MORE

Jul 1, 2019 in Python by Nisa
• 1,090 points
427 views
+1 vote
1 answer

How is set() implemented?

Sets in Python can be created using ...READ MORE

Jul 1, 2019 in Python by anonymous
440 views
0 votes
1 answer

How to read a large file, line by line, in Python?

The correct, fully Pythonic way to read ...READ MORE

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

Python urllib2 Response header

Try to request as Firefox does. You ...READ MORE

Jun 28, 2019 in Python by SDeb
• 13,300 points
2,086 views
0 votes
1 answer

Access the sole element of a set

Use set.pop: >>> {1}.pop() 1 >>> In your case, it would be: return ...READ MORE

Jun 28, 2019 in Python by SDeb
• 13,300 points
521 views
+1 vote
1 answer

is it possible to compare a values to a backslash in Python?

The backslash "\" character is used to ...READ MORE

Jun 28, 2019 in Python by Neel
• 3,020 points
1,486 views
0 votes
1 answer

how to use urllib module in python?

If you are using Python 3.x then ...READ MORE

Jun 28, 2019 in Python by Neel
• 3,020 points
632 views
0 votes
1 answer

how to check the syntax of python program without running the program?

Yes, it is possible to check the ...READ MORE

Jun 27, 2019 in Python by Arvind
• 3,040 points
4,956 views
0 votes
1 answer

How to send information greater than buffer size from server to the client?

complete_info='' while True: msg = ...READ MORE

Jun 27, 2019 in Python by Wajiha
• 1,950 points
2,344 views
0 votes
1 answer

Install .desktop file with setup.py

This looks like a good approach but ...READ MORE

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

How to stop input in SublimeREPL?

You have to do ctrl+break or ctrl+space ...READ MORE

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

How to resolve the error while importing cv2 from openCV in python?

I would recommend you go with anaconda ...READ MORE

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

How to add new keys to an already created python dictionary?

my_dict = {'name':'Jack', 'age': 26} my_dict['address'] = 'Downtown' ...READ MORE

Jun 26, 2019 in Python by Neel
• 3,020 points
573 views
0 votes
1 answer

Is it possible to run a function in Python using the command line?

Suppose your file name is demo.py and ...READ MORE

Jun 26, 2019 in Python by Neel
• 3,020 points
767 views
0 votes
1 answer

How to resolve the typeerror in python os module?

TypeError - because the argument doesn't have ...READ MORE

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

What is the patterns package in python used for?

Pattern is a web mining tool in ...READ MORE

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

what are sockets?

Sockets are basically open and close gateways ...READ MORE

Jun 25, 2019 in Python by Fata
• 1,050 points
452 views
0 votes
1 answer

'f' strings in Python

They are also known as Literal String ...READ MORE

Jun 25, 2019 in Python by Fata
• 1,050 points
594 views
+1 vote
1 answer

How to convert records from csv to a list in Python?

If you are using Python 3.x then ...READ MORE

Jun 25, 2019 in Python by Arvind
• 3,040 points

edited Jun 26, 2019 by Kalgi 9,589 views
+1 vote
1 answer

How to install a module in Python 3.6 ?

If you are using Ubuntu then the ...READ MORE

Jun 25, 2019 in Python by Arvind
• 3,040 points
987 views
0 votes
1 answer

Where should virtualenvs go in production?

Arguments for grouping in a common folder Cleaner ...READ MORE

Jun 25, 2019 in Python by SDeb
• 13,300 points
1,996 views
0 votes
1 answer

Pass --no-deps in PIP requirements.txt

There is no such option yet for ...READ MORE

Jun 25, 2019 in Python by SDeb
• 13,300 points
5,797 views
0 votes
1 answer

How to call Python script from bash with an agrument?

Hi, You need to call the same command ...READ MORE

Jun 25, 2019 in Python by Shabnam
• 930 points
11,561 views
0 votes
1 answer

How can I combine two dataframes in Python Pandas?

Hi, You can use the following methods to ...READ MORE

Jun 25, 2019 in Python by Shabnam
• 930 points
1,076 views
0 votes
1 answer

Attach volume to existing ec2 instance using python

Yes of course that's possible with just ...READ MORE

Jun 24, 2019 in Python by Krina
1,377 views
0 votes
1 answer

Create ESB Volume using python

You only have to use two simple ...READ MORE

Jun 24, 2019 in Python by Greg
449 views
0 votes
1 answer

Create an ec2 instance using boto

Hi @Neel, try this script: reservations = conn.get_all_instances(instance_ids=[sys.argv[1]]) instances ...READ MORE

Jun 24, 2019 in Python by Varsha
650 views
0 votes
1 answer

SSH into an ec2 instance using boto

Hi @Neha, try something like thus: import boto3 import ...READ MORE

Jun 24, 2019 in Python by Varsha
3,469 views
+1 vote
1 answer

Django not found error

Before installing Django make sure you have ...READ MORE

Jun 24, 2019 in Python by Fata
• 1,050 points
2,321 views
0 votes
1 answer

Deleting elements from numpy array

Use the following code: import numpy as np a=np.array([1,2,3,4]) b=np.delete(a,2) OUTPUT: array([1, ...READ MORE

Jun 24, 2019 in Python by Fata
• 1,050 points

edited Jun 25, 2019 by Kalgi 612 views
0 votes
1 answer

Error while installing cv2 module in pycharm

Go to tools -> python console -> ...READ MORE

Jun 24, 2019 in Python by Quin
11,043 views
0 votes
1 answer

Bypassing Cloudflare Scrapeshield

Scrapeshield basically checks if you are using ...READ MORE

Jun 24, 2019 in Python by SDeb
• 13,300 points
4,107 views
0 votes
1 answer

Python from Python: restricting functionality?

This doesn't seem like a good idea ...READ MORE

Jun 24, 2019 in Python by SDeb
• 13,300 points
422 views
0 votes
1 answer

How to get current time in Python?

Hi, You can use Datetime class. Input: import datetime datetime.datetime.now() Output: datetime.datetime(2019, 6, ...READ MORE

Jun 22, 2019 in Python by Taj
• 1,080 points
542 views
0 votes
1 answer

Is there a way to store a huge dataset as a dataframe using Pandas?

This can be easliy done by using ...READ MORE

Jun 22, 2019 in Python by Taj
• 1,080 points
725 views
0 votes
1 answer

How do I draw a hexagon using the turtle module of python?

Hey @Jinu, try this: import turtle polygon = ...READ MORE

Jun 23, 2019 in Python by Haseeb
6,883 views