What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-31 01:35:10
capitalize 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 -
Python 2021-10-28 19:33:12
time current time python time.time
"""Imports the datetime package from the Python library""" from datetime import datetime """Sets the variable now to the current date and time""" now = datetime.now() """The vari... Add solution -
Python 2021-10-27 21:51:13
how to find palingrams python
""" Program: Python program to find anagrams in a list of strings """ from collections import Counter def get_anagrams(input_string_list, test_string): print("*******************") print("input_str... Add solution -
Python 2021-10-25 14:47:09
python submit work to redis
# step 1: import the redis-py client package import redis # step 2: define our connection information for Redis # Replaces with your configuration information redis_host = "localhost" redis_port = 6379 redis_password = "" def hello... Add solution -
Python 2021-10-21 07:07:02
TypeError: dict is not a sequence
# If you're using SQLAlchemy: # Use "%%" instead of "%" in your queries, because # a single "%" is used in Python string formatting. # Alternatively escape the SQL properly with sqlalchemy.text(...): engine.execute(sqlalchem... Add solution -
TypeScript 2021-10-20 15:49:05
difference between arrays and lists in 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-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