questions/python/page/21
Hello @kartik, In your profile model provide related_name user ...READ MORE
Hi@akhtar, You need to install the module in ...READ MORE
os.remove() removes a file. os.rmdir() removes an empty directory. shutil.rmtree() deletes a ...READ MORE
string='My long string' if [[ $string == ...READ MORE
Hey, @Sushruth, Here the code goes for Motion Detector.py import ...READ MORE
can any one suggest solution data['isLarge'] = data.size.map({'small' ...READ MORE
Hello @ nishit, Indentation means the space from margin to ...READ MORE
Hello @kartik, Just replace and with , and you're done: try: ...READ MORE
Hello @Aruna, You can refer this for your ...READ MORE
Hi, @There, $ pip install gevent --pre $ pip ...READ MORE
Hello, Just replace and with , and you're done: try: ...READ MORE
import numpy as np from copy import deepcopy from ...READ MORE
Just import file without the '.py' extension. You can mark ...READ MORE
Hello, @Hitesh, You can follow the below: print("List of ...READ MORE
Hello @kartik, use os.chdir like this: os.chdir("/path/to/change/to") By the way, if you ...READ MORE
Hello @kartik, Try this out: >>> import os >>> os.path.abspath("mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt' Also ...READ MORE
Hi, @Shrinidhi, Kindly share your code snippet with ...READ MORE
Use random.choice() import random foo = ['a', 'b', 'c', 'd', ...READ MORE
To understand what yield does, you must understand what generators are. ...READ MORE
Actually, this is not a design flaw, ...READ MORE
from nsepy import get_history from datetime import date import ...READ MORE
Hey, @Natraj, This basically means that no response ...READ MORE