The two static analysis tools used to find bugs in Python are Pychecker and Pylint. Pychecker detects bugs from the source code and warns about its style and complexity. While Pylint checks whether the module …

Last updated 3 years, 4 months ago | 1295 views

Tags:- Python

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

Last updated 3 years, 1 month ago | 1289 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 3 years, 1 month ago | 1285 views

Tags:- Git

 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 3 years, 1 month ago | 1257 views

Tags:- Python Django

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 3 years, 2 months ago | 1255 views

Tags:- Windows

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 3 years, 1 month ago | 1250 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 3 years, 1 month ago | 1246 views

Tags:- Python Django

Using the query method we can print SQL query from the queryset post = Post.objects.all() print(post.query)  

Last updated 3 years, 4 months ago | 1216 views

Tags:- Django

Python | vars(), dir() and help()  The vars() function returns the __dict__ attribute of an object. The dir() function returns all properties and methods of the specified object, without the values. The help() function is used to display …

Last updated 3 years, 4 months ago | 1211 views

Tags:- Python

No. However, Abstract Base Classes (ABCs) are a feature from the abc module that let us declare what methods subclasses should implement. Python supports this module since version 2.7.

Last updated 3 years, 4 months ago | 1211 views

Tags:- Python

Python | filter(), map(), and reduce() Functions filter()  function accepts two arguments, a function and an iterable, where each element of the iterable is filtered through the function to test if the item is accepted or …

Last updated 3 years, 4 months ago | 1205 views

Tags:- Python

Python | Difference between @staticmethod and @classmethod A staticmethod is a method that knows nothing about the class or the instance it was called on. It just gets the arguments that were passed, no implicit first argument. …

Last updated 3 years, 4 months ago | 1199 views

Tags:- Python

Django | NoSQL NoSQL basically stands for “not only SQL”. This is considered an alternative to the traditional RDBMS or relational Databases. Officially, Django does not support NoSQL databases. However, there are third-party projects, such as …

Last updated 3 years, 4 months ago | 1118 views

Tags:- Django

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 3 years, 2 months ago | 1048 views

Tags:- Django

When working with PHP, there are situations where you may want to trigger an external URL in the background without affecting the user experience. This can be useful for logging, API calls, or background processing …

Last updated 7 months ago | 895 views

Tags:- PHP