questions/python/page/16
Yes. Use os.path.splitext >>> import os >>> filename, file_extension = ...READ MORE
can any one suggest solution data['isLarge'] = data.size.map({'small' ...READ MORE
Variables declared inside the class definition, but ...READ MORE
The SimpleHTTPServer module has been merged into http.server in Python 3.0. ...READ MORE
Hello, Try to downgrade protobuf, this worked for ...READ MORE
Here is my code: import pandas as p import ...READ MORE
img_shape = 224 test_data = [] test_labels = [] for ...READ MORE
Hi, you might have found another way ...READ MORE
In Python 3, you can use the sep= and end= parameters ...READ MORE
As mentioned in the error logs, try ...READ MORE
Hello @kartik, In your model class add a ...READ MORE
Open cmd and type the command and ...READ MORE
with in: substring in string: >>> substring = "please help ...READ MORE
Hello, To install requests module for Python2: $ sudo apt-get install ...READ MORE
The error says the list is not ...READ MORE
Hello @Mziko You can refer this:https://datatofish.com/txt-files-d ...READ MORE
take input here import ast items=ast.literal_eval(input()) #start writing your code ...READ MORE
Loop through the $forbiddennames array and use stripos to check if ...READ MORE
Hii, Environment variables must be strings, so use os.environ["DEBUSSY"] ...READ MORE
Try using in like this: >>> x = 'hello' >>> y ...READ MORE
Hii, The easiest way is to use shutil.make_archive. It ...READ MORE
Hello @kartik, To trigger a download you need ...READ MORE
try import-export library of Django or if you are ...READ MORE
1. I have a folder with multiple ...READ MORE
You need to decode the bytes object ...READ MORE
First build an Element instance root from the XML, ...READ MORE
if "ABCD" in "xxxxABCDyyyy": ...READ MORE
>>> x = "Hello World!" >>> x[2:] 'llo World!' >>> ...READ MORE
I use python for biology and I got ...READ MORE
Do not use with pip > 10.0! My ...READ MORE
Traceback (most recent call last): File "main.py", line ...READ MORE
Assuming module foo with method bar: import foo method_to_call = getattr(foo, 'bar') result ...READ MORE
Instead of using the /regex/g syntax, you can construct ...READ MORE
Hello @kartik, Try this: import pandas as pd df = ...READ MORE
Hi@akhtar, You need to install pytest module in ...READ MORE
Hi, @There, Check what are you passing.. the ...READ MORE
You can use the in operator: if "blah" not in ...READ MORE
Hi@akhtar, It seems Sklearn is not installed properly ...READ MORE
Hello @kartik, Try this: def permutations(head, tail=''): ...READ MORE
On Python ≥ 3.5, use pathlib.Path.mkdir: from pathlib import ...READ MORE
Python 2.7.9+ and 3.4+ Python 3.4 (released March 2014) ...READ MORE
H= float (input("Is this circuit charging& ...READ MORE
Python supports all the concept of "object ...READ MORE
Hello @kartik, In your profile model provide related_name user ...READ MORE
Go for Django . It's easy and ...READ MORE
Use: >>> import datetime >>> datetime.datetime.now() datetime.datetime(2009, 1, 6, 15, ...READ MORE
Hi, @There, The error is because there is ...READ MORE
Hello @kartik, I assume you're using a virtualenv ...READ MORE
Hi@akhtar, You have to install one module named ...READ MORE
Hello @divyashree def isPrime(n): # ...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.