What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-20 03:12:09
python sha256 of file
# Python program to find SHA256 hash string of a file import hashlib filename = input("Enter the input file name: ") sha256_hash = hashlib.sha256() with open(filename,"rb") as f: # Read and update hash st... Add solution -
Other 2021-10-11 13:34:14
alphabet rangoli hackerrank solution
# Alphabet Rangoli in Python - HackerRank Solution def print_rangoli(size): # your code goes here # Alphabet Rangoli in Python - HackerRank Solution START width = size*4-3 string = '' for i in range(1,size+1): for j in range(... Add solution -
Python 2021-10-10 04:48:10
capitalize string python
# Python string capitalization string = "this isn't a #Standard Sntence." string.capitalize() # "This isn't a #standard sentence." string.upper() # "THIS ISN'T A #STANDARD SENTENCE." string.lower() # "this isn't a #stand... Add solution -
Javascript 2021-10-08 12:48:06
generate schema from json python
#Example usage of generating python code from jsonschemacodegen import python as pygen import json with open('schema.json') as fp: generator = pygen.GeneratorFromSchema('output_dir') generator.Generate(json.load(fp), 'Example', 'example') #using... Add solution -
Python 2021-10-05 15:50:04
list vs array python
lists and arrays are used in Python to store data(any data type- strings, integers etc), both can be indexed and iterated also. ... Arrays need to be declared whereas lists do not need declaration because they are a part of Python's syntax. This is the re... Add solution -
Python 2021-09-27 21:38:04
python help
help() # If this is your first time using Python, you should definitely check out # the tutorial on the Internet at https://docs.python.org/3.8/tutorial/. # Enter the name of any module, keyword, or topic to get help on writing # Python programs and usin... Add solution