I am new to this site and very new at studying Python. I am following a youtube teaching by Dr. Charles Severance of Univ. of Michigan. There are times (few) when he does something as an example, but I do not get the same results when I do it. Like this below, my range doesn't print each individual item. It only prints "range" and the start & end...so like...range(0, 4)
not [0, 1, 2, 3]
.
he does, print(range(4))
and gets... [0, 1, 2, 3]
I get... range(0, 4)
...or he does...
friends = ['Joseph', 'Glenn', 'Sally']
print(range(len(friends)))
...and he gets... [0, 1, 2]
I get... range(0, 3)
I mean I am typing exactly the same thing. What is wrong? Is it my install of Python? Is there something that I have to install, import, or enable to get mine to work the same?
It also happens when he uses quit()
. His quits when it reaches it, mine does not quit? no traceback or any indication that anything is wrong. It is like Python just ignores it.
Any help would be greatly appreciated.
Thank you in advance.