What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-27 22:15:07
OrederedDict
import collections #dictionnarry that remembers the order in which the items where given print 'Regular dictionary:' d = {} d['a'] = 'A' d['b'] = 'B' d['c'] = 'C' d['d'] = 'D' d['e'] = 'E' for k, v in d.items(): print k, v print '\nOrderedDict:' d =... Add solution -
Python 2022-02-27 20:35:07
.env files in repl
#in the ".env" file. THIS IS FOR PYTHON TOKEN=38zdJSDF48fKJSD4824fN DB_USERNAME="admin" # defining variables like you'd do in python but secret DB_PASSWORD=w0ws0secure!! #in the "main.py" file import os print(os.getenv(&quo... Add solution -
Python 2022-02-27 15:55:01
how to return Fibbonaci(n) python
#Python program to generate Fibonacci series until 'n' value n = int(input("Enter the value of 'n': ")) a = 0 b = 1 sum = 0 count = 1 print("Fibonacci Series: ", end = " ") while(count <= n): print(sum, end = " &quo... Add solution -
Python 2022-02-27 00:45:02
sphinx, where to write the glossary of a sofware project
.. glossary:: Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation. It was originally created for the Python documentation, and it has excellent facilities for the documentation of software projects in a ... Add solution -
TypeScript 2022-02-25 16:35:03
how to fix takes 0 positional arguments but 2 were given
When Python tells you "generatecode() takes 0 positional arguments but 1 was given", it's telling you that your method is set up to take no arguments, but the self argument is still being passed when the method is called, so in fact it is receiv... Add solution