What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-22 09:40:04
run for loop inside pdb
(pdb) !import code; code.interact(local=vars()) Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >... Add solution -
Python 2022-03-19 21:45:09
sort python dictionary by date
from datetime import datetime from collections import OrderedDict # For python 2.7 and above data = { "01-01-2015" : "some data", "05-05-2015" : "some data", "03-04-2015" : "some data&... Add solution -
Python 2022-01-31 05:15:37
python wikipedia
import wikipediaapi wiki = wikipediaapi.Wikipedia("en") page = wiki.page("Python (programming language)") print(page.summary) # Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy... Add solution -
Python 2022-01-22 04:40:02
python check if input() gives error
try: # Note: Python 2.x users should use raw_input, the equivalent of 3.x's input age = int(input("Please enter your age: ")) except ValueError: print("Sorry, I didn't understand that.") else: if age >= 18: print(... Add solution -
Shell/Bash 2021-11-17 21:30:18
uninstall python 2.7 and install 3
: ' Ubuntu depends greatly on Python 2.7 and Python 3, so there is no good method to remove it. Warning: Do not even try to remove it else you will have your OS broken. Here is my advice.... create a virtual environment for your workspaces, and if ... Add solution -
Other 2021-11-16 05:37:27
error: command 'gcc' failed with exit status 1
For python 2.7 sudo yum -y install gcc gcc-c++ kernel-devel sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel pip install "your python packet" For python 3.4 sudo apt-get install python3-dev pip install "your pyth... Add solution