Python | Lambda function A lambda function is a small anonymous function. This function can have any number of parameters but, can have just one statement.     Syntex:  lambda arguments : expression   a = lambda x,y : …

Last updated 3 years, 4 months ago | 1579 views

Tags:- Python

Python | Exception Handling Python has many built-in exceptions that are raised when your program encounters an error. Try and Except Statement – Catching Exceptions: Try and except statements are used to catch and handle …

Last updated 3 years, 4 months ago | 1579 views

Tags:- Python

Python | Global, Protected, and Private Global, Protected, and Private access modifiers in Python. Python does not use these keywords to control access modifications instead single and double underscore  ‘_’ symbols are used to specify Protected and  Private to determine the access control. …

Last updated 3 years, 4 months ago | 1570 views

Tags:- Python

Python | Send an email To send an email, Python provides smtplib and email modules. Import these modules into the created mail script and send mail by authenticating a user. It has a method SMTP(smtp-server, port). …

Last updated 3 years, 4 months ago | 1566 views

Tags:- Python

Django | Meta Class A Meta class is simply an inner class that provides metadata about the outer class in Django. It defines such things as available permissions, associated database table name, singular and plural versions …

Last updated 3 years, 4 months ago | 1559 views

Tags:- Django

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

Last updated 3 years, 2 months ago | 1540 views

Tags:- Python

Python | Iterator | (__iter__ and __next__) Iterators are objects that can be iterated upon. The iterator protocol for Python declares that we must make use of two functions to build an iterator- iter() and next().   …

Last updated 3 years, 4 months ago | 1534 views

Tags:- Python

Django | Request/Response Cycle Whenever a request is received by the Django server. The Request is processed by various middlewares and is passed to the URL Router. Then, the server looks for a matching URL in the urlpatterns …

Last updated 3 years, 4 months ago | 1532 views

Tags:- Django

Some of the more well-known companies that make use of Django are:’ Instagram Mozilla Firefox Reddit YouTube Disqus Bitbucket Spotify NASA Pinterest Eventbrite, etc.

Last updated 3 years, 4 months ago | 1531 views

Tags:- Django

Python | zip() Function Python zip() function returns a zip object, which maps a similar index of multiple containers. It takes an iterable, converts it into an iterator, and aggregates the elements based on the iterable passed. …

Last updated 3 years, 4 months ago | 1530 views

Tags:- Python

Primitive data types are Integers, Float, Strings, and Boolean. Non-primitive data types are Array, List, Tuples, Dictionary, Sets, and Files.    

Last updated 3 years, 4 months ago | 1524 views

Tags:- Python

You can do this by converting the list to a set using the set() method and comparing the length of this set with the length of the original list. If found equal, return True else …

Last updated 3 years, 2 months ago | 1517 views

Tags:- Python

Python | Delete a file Using command  os.remove(file_name)   Use the os module to delete a file, we need to first import it, and then use the remove() function provided by the module to delete the file. It …

Last updated 3 years, 4 months ago | 1513 views

Tags:- Python

Python | swapcase() Function It is a string's function that converts all uppercase characters into lowercase and vice versa. It automatically ignores all the non-alphabetic characters.   string = "IT IS IN LOWERCASE." print(string.swapcase())  

Last updated 3 years, 4 months ago | 1507 views

Tags:- Python

Python |  issubclass() This is done by using a method called issubclass() provided by python. The method tells us if any class is a child of another class by returning true or false accordingly.     …

Last updated 3 years, 4 months ago | 1501 views

Tags:- Python