questions/python/page/12
Hello @kartik, Only change your pub_date if published has ...READ MORE
Hello @ Try this code: import math x, y = ...READ MORE
Example of implicit line continuation: a = some_function( ...READ MORE
Hello @kartik, Set show_change_link to True (False by default) in your inline ...READ MORE
There isn't any need to add file.py while importing. ...READ MORE
Hi@Umama, If you are using Linux system, then ...READ MORE
Using scan should do the trick: string.scan(/regex/) READ MORE
Hello @kartik, You can use itertools.chain(): import itertools list2d = [[1,2,3], ...READ MORE
You can open a file for simultaneous ...READ MORE
Hi@akhtar, You may get this error if you ...READ MORE
ERROR: Command errored out with exit status ...READ MORE
Hii kartik, To get rid of the error, roll ...READ MORE
Hello, I had numpy installed on the same ...READ MORE
Seems like the pycrypto package is not ...READ MORE
There are two string methods for this, find() and index(). ...READ MORE
Using For loop This approach uses for loop ...READ MORE
Instead of doing a import like __import__ you can ...READ MORE
Hello @kartik, Python you can write your own ...READ MORE
You can go through this: from django.contrib.auth.models import ...READ MORE
Strings in Python are immutable (can't be changed). Because ...READ MORE
Hello @kartik, Using a modelserializer might be an ...READ MORE
There is no add() , append() , or insert() method ...READ MORE
for word in read: <--- iterating ...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
IndexError The IndexError is raised when you attempt to retrieve ...READ MORE
Use the original df1 indexes to create ...READ MORE
Hello @kartik, If you don't need to query ...READ MORE
Another way could be: color_dict = {'red':'#FF0000', 'green':'#008000', 'black':'#000000', 'white':'#FFFFFF'} for ...READ MORE
Hii, In express 4.x: req.get('Referrer') This will also check both spellings of ...READ MORE
Hello @kartik, You need to install the following ...READ MORE
While I'm Trying to Compare Two dates ...READ MORE
Hi@akhtar, If you are trying to install with pip ...READ MORE
Hello @kartiK, If you need to pass UUID ...READ MORE
Hello @kartik, On the basis of your information provided ...READ MORE
Hi@akhtar, You need to install the bs4 package ...READ MORE
Use: pip install --install-option="--prefix=$PREFIX_PATH" package_name You might also want ...READ MORE
Check if it's installed properly, It will work ...READ MORE
This somewhat depends on what platform you ...READ MORE
Hi, i am trying to generating joined ...READ MORE
Simple: st = "abcdefghij" st = st[:-1] There is ...READ MORE
Hi, @Henll, You should download the version that ...READ MORE
parameters = pd.read_csv(params_filename, sep="\t") free_parameters = parameters.columns.get_values().to_list() free_parameters = ...READ MORE
Hello @kartik, Using a form in a view can ...READ MORE
I think the general idea of the ...READ MORE
This can be done by importing the ...READ MORE
They do a similar thing but not ...READ MORE
Hey, @Zodarlxx, Could you please post your error ...READ MORE
There are three ways in which you ...READ MORE
tl;dr: Because of different default settings in ...READ MORE
Hello @Kartik, Use socket and its gethostname() functionality. This will get the hostname of ...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.