What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-29 11:11:10
Let's consider an infinite sequence of digits constructed of ascending powers of 10 written one after another python solution
import math import sys f = lambda x: math.sqrt(2.0 * x + 0.25) - 0.5 g = lambda x: f(x) % 1 == 0 inp = map(int, sys.stdin.read().split()[1:]) print(" ".join("1" if g(x-1) else "0" for x in inp)) Add solution -
Python 2021-10-26 04:32:07
raspberry pi keyboard python input
import tty, sys, termios filedescriptors = termios.tcgetattr(sys.stdin) tty.setcbreak(sys.stdin) x = 0 while 1: x=sys.stdin.read(1)[0] print("You pressed", x) if x == "r": print("If condition is met") termios.tcset... Add solution -
Python 2021-10-24 02:04:10
python cgi get raw post data
import sys formData = sys.stdin.read() Add solution -
Other 2021-10-23 18:48:13
no columns to parse from file
Using try and except just lets you continue in spite of errors and handle them. It won't magically fix your errors. read_csv expects csv files, which your input is obviously not. A quick look into the documentation: delim_whitespace : boolean, default F... Add solution