Python: Commands Flashcards
1
Q
A
prints text to screen
2
Q
x = raw_input(“…”)
A
takes input from user and sets variable ‘x’ to that input
3
Q
int(raw_input())
A
turns raw_input() into an integer
4
Q
from sys import argv
A
imports list ‘argv’ from object ‘sys’
5
Q
formatter
A
transfer an abstract flow of events into specific output events
6
Q
open(name[, mode[, buffering]])
A
makes file object available to python
7
Q
file.write(“…”)
A
writes lines to file
8
Q
file.close()
A
closes file
9
Q
file.read()
A
prints file to screen