In [1]:
print "hello!"
In [5]:
x=7
In [6]:
x.bit_length()
Out[6]:
In [7]:
type(x)
Out[7]:
In [8]:
x=0.25
In [9]:
type(x)
Out[9]:
In [10]:
x.as_integer_ratio()
Out[10]:
In [11]:
x="Hello world"
In [12]:
type(x)
Out[12]:
In [14]:
x.split()
Out[14]:
In [15]:
x= (1,2,3,"text")
In [16]:
x[3]
Out[16]:
In [18]:
x = [3,4,5]
print(x)
In [20]:
x.append(23)
In [21]:
x.pop()
Out[21]:
In [22]:
print x
In [23]:
x = {"key":"value",5:"tree"}
In [24]:
print x
In [25]:
x[5]
Out[25]:
In [27]:
x["key"]
Out[27]:
In [28]:
x["cat"] = "a small animal"
In [29]:
print x
In [30]:
for i in [3,5,2,57,8,3,2,5]:
print i
In [33]:
i=0
while(i <5):
print i
i+=1
In [36]:
def f(x):
y = x*x
return y
In [37]:
f(4)
Out[37]:
In [6]:
%%timeit -n1
with open("fibo_input.txt","r") as f:
x=f.read()
In [4]:
In [ ]:
In [ ]: