Python Tutorial for Beginners 4: Lists, Tuples, and Sets



In this Python Beginner Tutorial, we will begin learning about Lists, Tuples, and Sets in Python. Lists and Tuples allow us to work with sequential data, and Sets allow us to work with unordered unique values. We will go over most of the methods, learn when to use which data type, and also the performance benefits of each type as well. Let’s get started.

The code from this video can be found at:
https://github.com/CoreyMSchafer/code_snippets/tree/master/Python-Lists

Watch the full Python Beginner Series here:

Slicing Video: https://youtu.be/ajrtAuDg3yw

✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website – http://coreyms.com/
My Second Channel – https://www.youtube.com/c/coreymschafer
Facebook – https://www.facebook.com/CoreyMSchafer
Twitter – https://twitter.com/CoreyMSchafer
Instagram – https://www.instagram.com/coreymschafer/

#Python

source

30 thoughts on “Python Tutorial for Beginners 4: Lists, Tuples, and Sets”
  1. It’s 2022 and this is still the best free Python course I have come across. I always recommend your course to anyone who wants to learn Python. Thank you 🙏

  2. Ud me puede mostrar cómo hacer un arreglo de ventanas?
    Es muy fácil hacer una ventana
    VENT=Tk() #Ya superf[acil.
    Ahora deseo tener el arreglo VENT(1), VENT(2), VENT(3)……………………
    PUEDE AYUDARME?
    GRACIAS.

  3. Am really grateful I got my IST FILE from the name ⬆️⬆️⬆️⬆️⬆️⬆️above it really work effectively.

  4. Am really grateful I got my IST FILE from the name ⬆️⬆️⬆️⬆️⬆️⬆️above it really work effectively.

  5. I'm at about 18:00 and I don't understand the difference between "course" and "courses". We have not defined a variable for course so what does typing in "course" do?

  6. i am also learning python and the way he teaches is awesome but he should include practice set also with expalantion

  7. class Food():
    def __init__(self,dish_name="unknown",calories=100):
    self.dish_name=dish_name
    self.calories=calories

  8. ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    message = 'THIS IS A SECRET' #encrypted message
    def caesar_cipher(text,key):
    final_text = ""
    for k in text:
    try:
    temp = (ALPHA.index(k) + key) % 26
    final_text += ALPHA[temp]
    except ValueError:
    final_text+= k
    return final_text

  9. def _init_ (self, text_file_name, positive_file_name, negative_file_name):
    self.file_name = text_file_name
    file_text = open ("{}".format (text_file_name), "r")
    self.text = file_text.read()
    file_text.close()
    with open("{}".format (positive_file_name)) as file:
    list_positive_words = file.readlines()

    the_positive_words = ""
    for line in list_positive_words:
    the_positive_words+=line.strip()
    the_positive_words+=" "

    self.positive_words = the_positive_words.split()
    self.positive_words.append ("")

    with open("{}".format (negative_file_name)) as file:
    list_negative_words = file.readlines()

    the_negative_words = ""
    for line in list_negative_words:
    the_negative_words+=line.strip()
    the_negative_words+=" "

    self.negative_words = the_negative_words.split()
    self.negative_words.append("")

  10. def adding_numbers(the_list):
    new_list = list()
    for i in range (len (the_list)):
    if i != len (the_list)-1:
    new_list.append (the_list[i]+the_list[i+1])
    return new_list

Leave a Reply

Your email address will not be published.

Captcha loading...