What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-01 14:14:05
stack program in python 3
>>> myStack = [] >>> myStack.append('a') >>> myStack.append('b') >>> myStack.append('c') >>> myStack ['a', 'b', 'c'] >>> myStack.pop() 'c' >>> myStack.pop() 'b' >>> myStack.pop() '... Add solution -
Python 2021-09-22 20:06:02
python try else pass
try: # Code to test / execute print('Test') except (SyntaxError, IndexError) as E: # specific exceptions # Code in case of SyntaxError for example print('Synthax or index error !') except : # Code for any other exception print('Other er... Add solution -
Python 2021-09-22 19:58:03
prime number and fibonacci series in python
import math num = int(input()) def isPrime(num): if num == 2 or num == 3 or num == 5 or num == 7: prime = True elif num % 2 == 0 or num % 3 == 0 or num % 5 == 0 or num % 7 == 0: prime = False elif math.ceil(math.sqrt(num)) -... Add solution -
Python 2021-09-20 08:44:02
stack example in python
#using doubly linked list from collections import deque myStack = deque() myStack.append('a') myStack.append('b') myStack.append('c') myStack deque(['a', 'b', 'c']) myStack.pop() 'c' myStack.pop() 'b' myStack.pop() 'a' myStack.pop() #Traceback (most ... Add solution -
Python 2021-09-18 18:06:03
get table wikipedia
import requests from bs4 import BeautifulSoup URL = "https://en.wikipedia.org/wiki/List_of_current_heads_of_state_and_government" res = requests.get(URL).text soup = BeautifulSoup(res,'lxml') for items in soup.find('table', class_='wikitable')... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5