In [2]:
"cats"


Out[2]:
'cats'

In [3]:
"pigeons"


Out[3]:
'pigeons'

In [4]:
"hawk"


Out[4]:
'hawk'

In [5]:
z = "cats"

In [7]:
my_long_list = ["at3g32590", "at4g23456", "at1g43567", "at5g12345", 345, 433, 45, "like", 43, 695, 432]
my_long_list[0:5]


Out[7]:
['at3g32590', 'at4g23456', 'at1g43567', 'at5g12345', 345]

In [9]:
odds + [1. 3. 5. 7]


  File "<ipython-input-9-d281b8effea5>", line 1
    odds + [1. 3. 5. 7]
                ^
SyntaxError: invalid syntax

In [10]:
odds


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-10-671e6229eee0> in <module>()
----> 1 odds

NameError: name 'odds' is not defined

In [11]:
odds = [1, 3, 5, 7]

In [12]:
odds


Out[12]:
[1, 3, 5, 7]

In [13]:
odds.apped[11]


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-13-a42883362330> in <module>()
----> 1 odds.apped[11]

AttributeError: 'list' object has no attribute 'apped'

In [14]:
oddsappend[11]


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-14-9d122320a41c> in <module>()
----> 1 oddsappend[11]

NameError: name 'oddsappend' is not defined

In [15]:
oddsappend[11]


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-15-9d122320a41c> in <module>()
----> 1 oddsappend[11]

NameError: name 'oddsappend' is not defined

In [16]:
oddsappend [11]


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-16-ba840b5eadbd> in <module>()
----> 1 oddsappend [11]

NameError: name 'oddsappend' is not defined

In [17]:
odds.append [11]


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-17-dd4b41a5c9a4> in <module>()
----> 1 odds.append [11]

TypeError: 'builtin_function_or_method' object is not subscriptable

In [18]:
odds.append[1]


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-18-d9b003c0ebe5> in <module>()
----> 1 odds.append[1]

TypeError: 'builtin_function_or_method' object is not subscriptable

In [19]:
odds


Out[19]:
[1, 3, 5, 7]

In [20]:
odds.append[11]


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-20-62a8e1778fd7> in <module>()
----> 1 odds.append[11]

TypeError: 'builtin_function_or_method' object is not subscriptable

In [21]:
odds.append[11]


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-21-62a8e1778fd7> in <module>()
----> 1 odds.append[11]

TypeError: 'builtin_function_or_method' object is not subscriptable

In [22]:
odds


Out[22]:
[1, 3, 5, 7]

In [23]:
odds.append(11)

In [24]:
odds


Out[24]:
[1, 3, 5, 7, 11]

In [25]:
print("Mylistis%s" % odds)


Mylistis[1, 3, 5, 7, 11]

In [26]:
first_dict ={}

In [29]:
first_dict[24]="apples"

In [30]:
first_dict[24]


Out[30]:
'apples'

In [31]:
first_dict[27]="oranges"

In [32]:
first_dict[17]="pears"

In [33]:
first_dict{24}


  File "<ipython-input-33-4a65f81f9b49>", line 1
    first_dict{24}
              ^
SyntaxError: invalid syntax

In [34]:
first_dict[17]


Out[34]:
'pears'

In [35]:
first_dict["oranges"]


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-35-99d5f419fd07> in <module>()
----> 1 first_dict["oranges"]

KeyError: 'oranges'

In [36]:
first_dict["apples"]


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-36-15056f953e24> in <module>()
----> 1 first_dict["apples"]

KeyError: 'apples'

In [37]:
first_dict[24]


Out[37]:
'apples'

In [38]:
True


Out[38]:
True

In [39]:
False


Out[39]:
False

In [40]:
tyep(True)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-40-caa932a1dd40> in <module>()
----> 1 tyep(True)

NameError: name 'tyep' is not defined

In [41]:
type(True)


Out[41]:
bool

In [42]:
type(False)


Out[42]:
bool

In [43]:
1<10


Out[43]:
True

In [44]:
1 >=10


Out[44]:
False

In [45]:
(35+7)<90


Out[45]:
True

In [46]:
word = "hello"
for char in word:
    print(char)


h
e
l
l
o

In [49]:
my_str = "hello"
mylist = []
    for s in my_str:


  File "<ipython-input-49-15f37167cdf5>", line 3
    for s in my_str:
    ^
IndentationError: unexpected indent

In [51]:
my_str = "hello"
mylist = []

    for s in my_str:


  File "<ipython-input-51-9c2497625088>", line 4
    for s in my_str:
    ^
IndentationError: unexpected indent

In [52]:
my_str = "hello"
mylist = []

for s in my_str:
      print(char)


o
o
o
o
o

In [55]:
my_str = "hello"
mylist = []

for s in my_str:


  File "<ipython-input-55-04f265243f1a>", line 2
    mylist = ["h". "e", "l", "l", "o"]
                     ^
SyntaxError: invalid syntax

In [60]:
my_str = "hello"
mylist = []

for s in my_str:


  File "<ipython-input-60-8b976e24901d>", line 4
    for s in my_str:
                    ^
SyntaxError: unexpected EOF while parsing