Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Python 2.7 Tutorial Part 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,207
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 28, 2010

I continue my Python 2.7 Tutorial by covering how to use Tuples and Lists in Python.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (derekbanas)

  • how do you paste like for example "[1,2,3,4,5,6,7,8,9,10]" in so quickly?

  • @Gregore2000 I edit out all of the pauses in the video :)

  • hello. beginning user here. quick question on the console... how are you able to, for example, type "print tupleEx[1]" and have it automatically run in the console. Your examples do it automantically, on mine i have to hit "Run" everytime which makes me save every time.

    thanks,

    sam

  • @sameyeare I tied run into my F5 key

  • I have to type ()s around the name of my tuple or list when I'm printing them.

    Ex.

    Print (tupleEx)

    instead of

    Print tupleEx

    I also cannot get the type function to work. I believe this is because I'm using Python 3.2 instead of 2.7. It's not that big of a deal but, I was wondering if there are bigger differences down the line. Can I still use your videos to learn how to use Python.

  • @22ecic I have a tutorial on python 3.0 and up. It's called python how to program. You can find it on my YouTube channel. That will solve your problem

see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • @ribsmcgee1 As he states in the video, you can not change a single element of a tuple. If you want to use append you need to make your tuple a list. Do this by using [ ] instead of ( ). For example ('Derek', 35, 'Pittsburgh','PA') would be changed to ['Derek', 35, 'Pittsburgh','PA'].

  • nevermind, I figured it out. got used to the parentheses, and used them for the list instead of square brackets.

  • I tried to add the joy to list ex and it gives me an error saying AttributeError: 'tuple' object has no attribute 'append'

  • @mesmer19 Thanks I will :)

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more