What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-16 11:23:18
Dynamic Variable declaration in Python
#1st example user_input = raw_input("Enter a variable name : ") Enter a variable name: number globals()[user_input] = 25 # you can use locals to assign local variable # This is dynmic variable declaration #2nd example Class Table: def __init... Add solution -
Python 2021-11-15 08:06:09
python check if is infinity
"Remember to import math!" "the math.isinf() can detect if it is an infinity ( - and + inf return true) import math x = math.inf y = -math.inf z = 222 print(math.isinf(x)) #Expected: True print(math.isinf(y)) #Expected: True print(math.isin... Add solution -
Python 2021-11-14 13:53:15
KivyMD video recording
from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.boxlayout import BoxLayout from kivy.uix.image import Image from kivy.clock import Clock from kivy.graphics.texture import Texture from kivy.properties import StringProperty, Numeri... Add solution