questions/python/page/12
Hello @kartik, Only change your pub_date if published has ...READ MORE
Hii kartik, To get rid of the error, roll ...READ MORE
Hi, @There, A possibility is that the element ...READ MORE
Hello @kartik, You can use itertools.chain(): import itertools list2d = [[1,2,3], ...READ MORE
I want to load the NSL_KDD data ...READ MORE
If you're running Python 2.7.9+ or Python ...READ MORE
Hello @kartik, The first thing to do is ...READ MORE
Hello @kartik, You can definitely do this using ...READ MORE
You can open a file for simultaneous ...READ MORE
Hello @kartik, On the basis of your information provided ...READ MORE
Hello, I had numpy installed on the same ...READ MORE
Hii, In express 4.x: req.get('Referrer') This will also check both spellings of ...READ MORE
variable = [] Now variable refers to an empty list*. Of ...READ MORE
This can be done by importing the ...READ MORE
Hi@akhtar, You may get this error if you ...READ MORE
ERROR: Command errored out with exit status ...READ MORE
Hello @kartik, Python you can write your own ...READ MORE
Example of implicit line continuation: a = some_function( ...READ MORE
Python 3.5+: import pathlib pathlib.Path('/my/directory').mkdir(parents=True, exist_ok=True) pathlib.Path.mkdir as used above ...READ MORE
Instead of doing a import like __import__ you can ...READ MORE
Using scan should do the trick: string.scan(/regex/) READ MORE
Hello @kartik, Using a modelserializer might be an ...READ MORE
Hello @kartik, If you don't need to query ...READ MORE
There isn't any need to add file.py while importing. ...READ MORE
Hello, Try this: return HttpResponse(status=204) Hope it works!! ...READ MORE
Try this: pip uninstall pyttsx3 Then: pip install pyttsx3==2.71 READ MORE
Using For loop This approach uses for loop ...READ MORE
You can go through this: from django.contrib.auth.models import ...READ MORE
Hello @kartik, You need to install the following ...READ MORE
There is no add() , append() , or insert() method ...READ MORE
Hello @kartiK, If you need to pass UUID ...READ MORE
There are two string methods for this, find() and index(). ...READ MORE
Hello @kartik, Using a form in a view can ...READ MORE
Hi@akhtar, If you are trying to install with pip ...READ MORE
Strings in Python are immutable (can't be changed). Because ...READ MORE
for word in read: <--- iterating ...READ MORE
Hello @kartik, None, False and True all are available ...READ MORE
Another way could be: color_dict = {'red':'#FF0000', 'green':'#008000', 'black':'#000000', 'white':'#FFFFFF'} for ...READ MORE
Hello @kartik, request.user is User model object. You cannot access ...READ MORE
Use the original df1 indexes to create ...READ MORE
Hi@akhtar, You need to install the bs4 package ...READ MORE
Hi, @Henll, You should download the version that ...READ MORE
IndexError The IndexError is raised when you attempt to retrieve ...READ MORE
Hi, I am very new to Python ...READ MORE
If you write x.insert(2,3) and then print x ...READ MORE
Check if it's installed properly, It will work ...READ MORE
While I'm Trying to Compare Two dates ...READ MORE
For Python 3.5+ use: import importlib.util spec = importlib.util.spec_from_file_location("module.name", ...READ MORE
They do a similar thing but not ...READ MORE
Hey, @S, you can have a look at ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.