Community Data Science Workshops (Fall 2014)/Day 0 tutorial: Difference between revisions

Content added Content deleted
(Bolded the fact that this is a python prompt after answering the same question >1 times.)
imported>Ben zen
m (→‎String length: Unicode is evil.)
Line 224: Line 224:
len("Hello")
len("Hello")
len("")
len("")
fish = "humuhumunukunukuapuaʻa"
fish = "humuhumunukunukuapua'a"
name_length = len(fish)
name_length = len(fish)
fish + " is a Hawaiian fish whose name is " + str(name_length) + " characters long."
fish + " is a Hawaiian fish whose name is " + str(name_length) + " characters long."