Python | Check the memory usage of  an object >>> import sys >>> x = 100 >>> print(sys.getsizeof(x)) 28  

Last updated 2 years, 3 months ago | 939 views

Tags:- Python

Python | Print String N times >>> s = 'Python' >>> n = 5 >>> print(s * n) PythonPythonPythonPythonPython  

Last updated 2 years, 3 months ago | 856 views

Tags:- Python Django

Python | Return multiple values from functions >>> def A(): return 2, 3, 4 >>> a, b, c = A() >>> print(a, b, c) 2 3 4  

Last updated 2 years, 3 months ago | 768 views

Tags:- Python Django

Python | Join all items of a list to convert into a single string >>> x = ["Python", "Online", "Training"] >>> print(" ".join(x)) Python Online Training  

Last updated 2 years, 3 months ago | 696 views

Tags:- Python Django

Python | Reversing a String >>> x = 'PythonWorld' >>> print(x[: : -1]) dlroWnohtyP  

Last updated 2 years, 3 months ago | 756 views

Tags:- Python Django

 Python | In-place swapping of two numbers >>> a, b = 10, 20 >>> print(a, b) 10 20 >>> a, b = b, a >>> print(a, b) 20 10  

Last updated 2 years, 3 months ago | 769 views

Tags:- Python Django

Git | Undo the most recent local commits Bellow command is used to reset the last local commit. git reset HEAD~        

Last updated 2 years, 3 months ago | 781 views

Tags:- Git

In Django, static files are the files that serve the purpose of additional purposes such as images, CSS, or JavaScript files. Static files managed by “django.contrib.staticfiles”. There are three main things to  set up static …

Last updated 2 years, 3 months ago | 737 views

Tags:- Django

Compared to other frameworks, Django offers more code reusability. As Django is a combination of apps, copying those apps from one directory to another with some tweaks to the settings.py file won't need much time …

Last updated 2 years, 3 months ago | 927 views

Tags:- Django

Django follows a Model-View -Template (MVT) architecture which is a variant of the MVC architecture.  Model: Logical data structure behind the entire app and signified by a database. A model is used in Django to …

Last updated 2 years, 3 months ago | 858 views

Tags:- Django

Windows | Set path and environment variables in Windows 11 Press the + to access the Power User Task Menu. In the Power User Task Menu, select the System option. In the System window, scroll to the bottom and click the About option. In the System …

Last updated 2 years, 3 months ago | 784 views

Tags:- Windows

Windows | Set path and environment variables in Windows 2000 and Windows XP On the desktop, right-click the Computer icon and select Properties. or Press the  and right-click the Computer option in the Start menu, and select Properties. In the System Properties window, click the Advanced tab. In the Advanced tab, click …

Last updated 2 years, 3 months ago | 833 views

Tags:- Windows

Windows | Set path and environment variables in Windows Vista and Windows 7 On the desktop, right-click the Computer icon and select Properties. or Press the  and right-click the Computer option in the Start menu, and select Properties. Click the Advanced System Settings link in the left column. In …

Last updated 2 years, 3 months ago | 857 views

Tags:- Windows

Windows | Set path and environment variables in Windows 8 Press the + to access the Power User Task Menu Now, select the System option. Click the Advanced System Settings link in the left column. In the Advanced tab, click the  button. In the Environment Variables window highlight …

Last updated 2 years, 3 months ago | 789 views

Tags:- Windows

A few common security issues that can be avoided by using Django are: Clickjacking Cross-site scripting and SQL injection

Last updated 2 years, 3 months ago | 1026 views

Tags:- Python