What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-25 01:18:05
empty clear delete a list
# Python program to clear a list # using clear() method # Creating list GEEK = [6, 0, 4, 1] print('GEEK before clear:', GEEK) # Clearing list GEEK.clear() print('GEEK after clear:', GEEK) Add solution -
Python 2021-10-24 12:51:18
fibonacci sequence python 2.7
#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 2021-10-24 02:51:06
do intersection between list python
# Python program to illustrate the intersection # of two lists in most simple way def intersection(lst1, lst2): lst3 = [value for value in lst1 if value in lst2] return lst3 # Driver Code lst1 =... 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 -
Python 2021-10-18 22:38:10
fibonacci program in 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 2021-10-17 17:31:12
fiboacci in 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 2021-10-14 20:52:04
decimal to octal python
# Python program to convert decimal into other number systems dec = 344 print("The decimal value of", dec, "is:") print(bin(dec), "in binary.") print(oct(dec), "in octal.") print(hex(dec), "in hexadecimal.&quo... Add solution