questions/python/page/16
The error says the list is not ...READ MORE
TL;DR: pip install -Iv (i.e. pip install -Iv MySQL_python==1.2.2) First, I ...READ MORE
You could use in to check if a string ...READ MORE
How to read and generate QR codes ...READ MORE
Hi@akhtar, You need to install pytest module in ...READ MORE
Yep, using the static method decorator class MyClass(object): ...READ MORE
some_list[-1] is the shortest and most Pythonic. In fact, ...READ MORE
Hello @ Anee, Code: num1 = int(input("Enter First Number: ")) num2 ...READ MORE
Use the type() builtin function: >>> i = 123 >>> type(i) <type ...READ MORE
Try using in like this: >>> x = 'hello' >>> y ...READ MORE
Variables declared inside the class definition, but ...READ MORE
Hi@akhtar, You have to install one module named ...READ MORE
Hello geeks: Here is my models: class Room_Type(models.Model): """Django data ...READ MORE
The SimpleHTTPServer module has been merged into http.server in Python 3.0. ...READ MORE
Hello @kartik, Try this: import pandas as pd df = ...READ MORE
take input here import ast items=ast.literal_eval(input()) #start writing your code ...READ MORE
Yes. Use os.path.splitext >>> import os >>> filename, file_extension = ...READ MORE
Hello @Mziko You can refer this:https://datatofish.com/txt-files-d ...READ MORE
img_shape = 224 test_data = [] test_labels = [] for ...READ MORE
In Python 3, you can use the sep= and end= parameters ...READ MORE
if "ABCD" in "xxxxABCDyyyy": ...READ MORE
Here is my code: import pandas as p import ...READ MORE
Hi@akhtar, It seems Sklearn is not installed properly ...READ MORE
Hello, Try to downgrade protobuf, this worked for ...READ MORE
Hi, you might have found another way ...READ MORE
Hello @kartik, To trigger a download you need ...READ MORE
Open cmd and type the command and ...READ MORE
Hii, The easiest way is to use shutil.make_archive. It ...READ MORE
Hi @There, As the path is fixed, use ...READ MORE
Hello @kartik, In your model class add a ...READ MORE
Hello @kartik, I assume you're using a virtualenv ...READ MORE
Traceback (most recent call last): File "main.py", line ...READ MORE
Loop through the $forbiddennames array and use stripos to check if ...READ MORE
Hello, To install requests module for Python2: $ sudo apt-get install ...READ MORE
Hi@akhtar, To avoid this error make sure you ...READ MORE
with in: substring in string: >>> substring = "please help ...READ MORE
>>> x = "Hello World!" >>> x[2:] 'llo World!' >>> ...READ MORE
First build an Element instance root from the XML, ...READ MORE
try import-export library of Django or if you are ...READ MORE
You need to decode the bytes object ...READ MORE
Hi, @There, The error is because there is ...READ MORE
I use python for biology and I got ...READ MORE
Hi, @There, Check what are you passing.. the ...READ MORE
Do not use with pip > 10.0! My ...READ MORE
Hii, Environment variables must be strings, so use os.environ["DEBUSSY"] ...READ MORE
Assuming module foo with method bar: import foo method_to_call = getattr(foo, 'bar') result ...READ MORE
You can use the in operator: if "blah" not in ...READ MORE
Hello @kartik, You could chain your queries as ...READ MORE
Python 2.7.9+ and 3.4+ Python 3.4 (released March 2014) ...READ MORE
Hello @kartik, Try this: def permutations(head, tail=''): ...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.