Latest questions in Python

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,856 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,306 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
690 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
689 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,702 views
0 votes
3 answers

How to draw a tic tac toe board in python?

def printTable():             for i in range(1,10):                     print(" ",end=' ')                     if(i%3==0 ...READ MORE

Oct 11, 2020 in Python by Sumit Nagpal
11,028 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
557 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
748 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,425 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
554 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
440 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
558 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,562 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
974 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,971 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,748 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,548 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,058 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,359 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
439 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
637 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,458 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,293 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 591 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
10,985 views
0 votes
0 answers

What are different libraries for SOAP in python?

Is the documentation present for those libraries? READ MORE

Jun 24, 2019 in Python by Waseem
• 4,540 points
332 views
0 votes
0 answers

How do you install Tkinter in python?

What is the basic function of Tkinter ...READ MORE

Jun 24, 2019 in Python by Waseem
• 4,540 points
460 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,070 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
406 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
526 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
713 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,816 views
0 votes
1 answer

How do I create a star using the turtle module of python?

Hey @Jinu, Try something like this: import turtle star = ...READ MORE

Jun 22, 2019 in Python by Neha
1,364 views
0 votes
1 answer

Draw a square using the turtle module - Python

Hey @Baily, use something like this: import turtle sq ...READ MORE

Jun 22, 2019 in Python by Himanshu
1,304 views
0 votes
1 answer

Snake head placed on the center - Python using turtle

You can use turtle's goto() function. This ...READ MORE

Jun 21, 2019 in Python by Greg
607 views
0 votes
1 answer

What does the penup() do in Python(turtle module)

penup() basically makes sure that the moving ...READ MORE

Jun 21, 2019 in Python by Iris
5,910 views
0 votes
0 answers

How to install python modules using wheeling format?

Can you show the installation of pyaudio ...READ MORE

Jun 21, 2019 in Python by Waseem
• 4,540 points
429 views
0 votes
0 answers

How do you perform selection sort in python?

Can you sort a list with n ...READ MORE

Jun 21, 2019 in Python by Waseem
• 4,540 points
373 views
0 votes
4 answers

How do I remove an element from a list by index in Python?

Delete the List and its element: We have ...READ MORE

Jun 7, 2020 in Python by sahil
• 580 points
276,901 views
0 votes
1 answer

Reverse a string in Python

You should try to use the following ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,670 points
495 views
0 votes
1 answer

How to get size of a list?

Hi, You can use built-in function "len" to ...READ MORE

Jun 21, 2019 in Python by Shabnam
• 930 points
507 views
0 votes
1 answer

How do I run a set of code for all the requests in Flask?

Hi, You can use dedicated hooks(decorators) called before ...READ MORE

Jun 21, 2019 in Python by Shabnam
• 930 points
591 views
+1 vote
1 answer

Python code to determine its day or night

Try something like this: sample data: (timezone= utc/zulutime) ...READ MORE

Jun 21, 2019 in Python by Imran
5,694 views
0 votes
1 answer

What is the use of join()?

Join()  function is used in threading to ...READ MORE

Jun 20, 2019 in Python by Wajiha
• 1,950 points
426 views
0 votes
0 answers

Copy file with metadata - python

I would like to copy a file ...READ MORE

Jun 20, 2019 in Python by Trisha
443 views
0 votes
1 answer

Enter a 1-10, each on a new line in a file - python

Try something like this: i=1 for i in range(10): ...READ MORE

Jun 20, 2019 in Python by Greg
503 views
0 votes
1 answer

Open a file if it exists or create and open it does not exists - Python

You can use this: f = open("ex.txt","w+") Here the ...READ MORE

Jun 20, 2019 in Python by Jason
6,957 views
0 votes
1 answer

What is the difference between pop() and remove()?

Array elements can be removed using pop() ...READ MORE

Jun 20, 2019 in Python by Nisa
• 1,090 points
27,820 views
0 votes
1 answer

How do I read a file on only read only mode in python?

Hey @David! TRy something like this: campaign_data = ...READ MORE

Jun 20, 2019 in Python by Jason
578 views
0 votes
1 answer

How do I execute multiple SQL statements at once? - Python

You can use sqlite3 module. Have a ...READ MORE

Jun 20, 2019 in Python by Travis
29,834 views