Python | ‘is’, ‘not’, and ‘in’ operators is: Returns True if both variables are the same object >>> x = 5 >>> y = 5 >>> z = 1 >>> x is y True >>> x …

Last updated 3 years, 11 months ago | 1639 views

Tags:- Python

Django | ORM ORM stands for Object-relational Mapper. Instead of interacting with the database by writing raw SQL queries and converting the data returned from the query into a Python object, ORM allows us to interact …

Last updated 4 years, 1 month ago | 1638 views

Tags:- Django

Python is an interpreted language, that executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language.   Typing refers to type-checking in programming …

Last updated 4 years, 1 month ago | 1637 views

Tags:- Python

Python | Global, Local and Nonlocal variables Global variables are public variables that are defined in the global scope.  A variable declared inside the function's body or in the local scope is known as a …

Last updated 4 years, 1 month ago | 1632 views

Tags:- Python

Python | Break, Continue, and Pass Break: The break statement terminates the loop immediately and the control flows to the statement after the body of the loop. Continue: The continue statement skips the current iteration of the statement, …

Last updated 4 years, 1 month ago | 1619 views

Tags:- Python

Python | Slicing  As the name suggests, ‘slicing’ is taking parts of sequences like lists, tuples, and strings. Syntax for slicing is [start : stop : step] The start is the starting index from where to slice a …

Last updated 4 years, 1 month ago | 1618 views

Tags:- Python

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, 11 months ago | 1615 views

Tags:- Python 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 3 years, 11 months ago | 1602 views

Tags:- Windows

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

Last updated 4 years, 1 month ago | 1599 views

Tags:- 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, 11 months ago | 1598 views

Tags:- Windows

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

Last updated 3 years, 11 months ago | 1591 views

Tags:- Git

Python | Self Self is used to represent the instance of the class. With this keyword, you can access the attributes and methods of the class in python. It binds the attributes with the given arguments.   …

Last updated 4 years, 1 month ago | 1590 views

Tags:- Python

Django | Features  Features available in Django are Optimized for SEO Extremely fast A loaded framework that features authentications, content administrations and RSS feeds Exceptionally scalable to meet the heaviest traffic demand Highly secure Versatility, …

Last updated 4 years, 1 month ago | 1589 views

Tags:- Django

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

Last updated 3 years, 11 months ago | 1583 views

Tags:- Python Django

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

Last updated 3 years, 11 months ago | 1560 views

Tags:- Python Django