x = 493
x
493
warning = "There is an earthquake in the Pacific."
warning
'There is an earthquake in the Pacific.'
warning[0]
'T'
warning[-1]
'.'
len(warning)
38
employees = ["Jake", "Steve", "Sarah"]
employees[0]
'Jake'
employees = employees + ["Bill", "Stan"]
employees
['Jake', 'Steve', 'Sarah', 'Bill', 'Stan']
greetings = {
'English': 'Hello',
'Spanish': 'Hola'
}
greetings
{'English': 'Hello', 'Spanish': 'Hola'}
dates = (12, 15, 92)
f = open('data.txt')
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-28-eff2ebdcabd0> in <module>() ----> 1 f = open('data.txt') FileNotFoundError: [Errno 2] No such file or directory: 'data.txt'
f.close()
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-29-fa01cc0d8510> in <module>() ----> 1 f.close() NameError: name 'f' is not defined
type(dates)
tuple