What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-25 04:52:02
Given an integer, , and space-separated integers as input, create a tuple, , of those integers. Then compute and print the result of .
n = int(input()) integer_list =tuple( map(int, input().split())) print(hash(integer_list)) #Return the hash value of the object (if it has one). Hash values are integers. #They are used to quickly compare #dictionary keys... Add solution -
-
Python 2021-09-14 18:08:02
namedtuple
# ref: https://realpython.com/python-namedtuple/ >>> from collections import namedtuple """ The usage: ClassAlias = namedtuple(ClassName, ["field1","field2",...], rename=true/false, defaults=["value_n"... Add solution -
Python 2021-09-13 20:16:03
convert hex rgb to matplotlib color
hex_color = '3366CC' # from 0-255 integer format up_to_255_rgb = tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4)) #output: (51, 102, 204) # from 0-1 float format up_to_1_rgb = tuple(int(hex_color[i:i+2], 16)/255 for i in (0, 2, 4)) #output: (0.2, 0.4... Add solution -
Other 2021-09-10 22:34:02
get unadjusted stock data
from datetime import datetime import json from urllib.parse import urlencode from urllib.request import urlopen def gethistory(symbol, start=None, end=None): # Return 3 tuples (quotes, dividends and splits) with data from start # to end datetimes ... Add solution -
Python 2021-09-10 07:28:01
finding all vowels in a string python
def find_all_vowels(Word: str): if Word == None or Word == "": raise Exception("The arguments 'Word' is None or empty") vowles_in_Word = [] Word = Word.upper() Vowles_list = ["A","E","I&... Add solution