What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-15 11:46:38
why self is passed in every method python
By using the “self” keyword we can access the attributes and methods of the class in python. It binds the attributes with the given arguments. self is parameter in function and user can use another parameter name in place of it. But it is ad... Add solution -
Python 2022-02-11 03:25:32
dictionary in python
# Dictionaries in Python are used to store set of data like Key: Value pair # the syntax of a dictionary in Python is very simple we use {} inside that # we define {Key: Value}, to separate multiple values we use',' programming_dictionary = { "... Add solution -
Python 2022-01-24 17:40:25
metaclass python
A metaclass is the class of a class. A class defines how an instance of the class (i.e. an object) behaves while a metaclass defines how a class behaves. A class is an instance of a metaclass. While in Python you can use arbitrary callables for metaclass... Add solution -
Python 2021-11-21 11:46:29
filter array python
In simple words, the filter() method filters the given iterable with the help of a function that tests each element in the iterable to be true or not. Filter Methods is simply a like comprarator class of c++ STL Code Explanation: # A simple tutoria... Add solution -
Python 2021-11-16 05:45:20
how to make a terminal in python
# Honestly # Doing this in python without # using some electron library or something would be hell # Id highly recommend writing a terminal wrapper/CLI for what you want # Not going out of your way to write a whole new terminal # # Wx/Tk can never go wron... Add solution -
Python 2021-11-12 22:25:16
what are tuples used for
Tuples in Python An immutable data value that contains related elements. Tuples are used to group together related data, such as a person’s name, their age, and their gender. A tuple is the same as a list except uses parenthisies instead of square... Add solution