3+3
(50 - 5*6)/4
5/6
5.0/6
5//6
float(5)/6
# python2の時
from __future__ import division
import math
math.sqrt(36)
from math import sqrt
sqrt(36)
volume = 10
volume
red = 5
red*volume
'Hello world!'
"Hellor world!"
print('こんにちは')
print(' She said "hello"')
phrase = 'hello'
phrase
print(phrase)
print('My volume is {}'.format(volume))
phrase = 'hello ' + 'world!'
phrase
cities = ['NYC', 'LA', 'SF']
cities
cities[0]
cities[1]
cities[-1]
cities.append('CHI')
cities
range(10)
list(range(10))
list(range(3, 8))
list(range(0, 20, 2))
random_list = ['hello', 76, 'today', 4.3]
type('hello')
type(76)
type(4.3)
type(random_list)
len(random_list)