Python Data Types for Beginners | Python tutorial

Поділитися
Вставка
  • Опубліковано 11 чер 2024
  • Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
    Learn Python data types in this beginners tutorial. You will learn about Python basic data types, literal assignments, constructor functions, methods, built-in Python functions, and more.
    💖 Support me on Patreon ➜ / davegray
    ⭐ Become a full-stack dev with Zero To Mastery Courses:
    - The Complete Python Developer: bit.ly/CompPythonDev
    - Complete Machine Learning & Data Science: bit.ly/CompMachineLearning
    - Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
    🚩 Subscribe ➜ bit.ly/3nGHmNn
    📬 Course Updates ➜ courses.davegray.codes/
    ❓ Questions - Please post them to my Discord ➜ / discord
    ☕ Buy Me A Coffee ➜ www.buymeacoffee.com/davegray
    👇 Follow Me On Social Media:
    Github: github.com/gitdagray
    Twitter: / yesdavidgray
    LinkedIn: / davidagray
    🔗 Source Code: github.com/gitdagray/python-c...
    🔗 Playlist for this Python Course: bit.ly/dg-beginners-python
    Python Data Types Tutorial 🐍
    (00:00) Intro
    (00:05) Welcome
    (00:13) Naming a Python file
    (01:01) Literal Assignment & Checking Data Types
    (03:37) Constructor functions
    (05:49) String concatenation
    (07:00) Casting a number to a string
    (08:39) Multi-line strings
    (10:07) Escaping Special Characters
    (12:51) String Methods
    (19:19) Building a Menu
    (22:18) String Indexes & Index Ranges
    (24:36) Boolean data type
    (27:48) Integer data type
    (28:50) Float data type
    (29:36) Complex numeric data type
    (30:53) Built-in numeric functions
    (32:51) The math module
    (35:31) Casting a string to a number
    📚 Tutorial References:
    🔗 Python Official Site: www.python.org/
    🔗Visual Studio Code Official Site: code.visualstudio.com/
    Was this Python Data Types tutorial for beginners helpful? If so, please share. Let me know your thoughts in the comments.
    #python #data #types

КОМЕНТАРІ • 63

  • @verymessy
    @verymessy Місяць тому +2

    Dave... I hate math, and you somehow just made it manageable for me. THANK YOU!!!!

  • @rickythelarge5369
    @rickythelarge5369 Рік тому +3

    Dave, I am learning front-end with React through an internship at my company. Every day, I watch one of your videos at home to practice and learn about other languages. I am truly grateful because I feel that your videos are the best ones available for free online. You are number one. Sending a big hug from Italy.

  • @kazitanim007
    @kazitanim007 4 місяці тому +1

    Great course Dave, appreciate ur efforet.

  • @paulmaxwell1395
    @paulmaxwell1395 11 місяців тому +2

    just to say thank you very much i am learning python all thanks to your tutorials. Keep up the good work!

  • @eothamec2427
    @eothamec2427 7 місяців тому +1

    Hi, just wanted to say thanks for making this! I'm learning python so I can eventually work with it in the GIS field. I am glad your basics have such great explanations!

  • @saia6924
    @saia6924 Рік тому

    Wow, you are amazing Dave. Thank you so much

  • @staringintotheabyss1769
    @staringintotheabyss1769 Рік тому +5

    Hey Dave,I am so thankful to you for creating such content for free.
    Much love from India.
    Also I have a question,your teaching style is Fantastic no doubt,so I wanted to learn react js from you, but your tutorials are a year old and with the introduction of newer versions of react,would it be wise to follow them as I like your way of teaching and would love to start my journey in react from your course.
    Once again,thanks a lot for your efforts

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому +3

      Thank you! The React course for beginners teaches fundamentals and everything still applies. When you get to the React Router part, look in the description for the link that updates the React Router info. That is the only part to note for changes.

  • @QuesoGr7
    @QuesoGr7 3 місяці тому

    Its pretty cool that I alrady knew about indexes starting at 0 due to Blender's geometry nodes! Looking forward to being able to get more of of Blender after learning more about python! Really appreciate these vids, Dave!

  • @pengembangandiri1318
    @pengembangandiri1318 Рік тому

    good effort Dave.....your teaching style make me easy to understand your content. Honestly, you are really a good teacher for me.....👍👍👍👍

  • @rohitsingh-xj1ey
    @rohitsingh-xj1ey Рік тому

    Thank you soo much soo grateful for all the best content you are providing

  • @dickschweiger289
    @dickschweiger289 6 місяців тому

    very good. Downloaded your videos so i had to go through them here to give you thumbs up and a comment.

  • @alexanderkomanov4151
    @alexanderkomanov4151 Рік тому

    Thanks for another great video!

  • @serenityandtranquility6299
    @serenityandtranquility6299 Рік тому +1

    It's him again..Thank you so much Dave ❤❤

  • @JosephWright-ys9pv
    @JosephWright-ys9pv 3 місяці тому +1

    These are exceptionally made videos and i really cannot thank you enough!

  • @muhmmad7045
    @muhmmad7045 15 днів тому

    nice Dave, can you please guide me how I can set font as did in your vs code ?

  • @codernerd7076
    @codernerd7076 Рік тому

    Thanks for another great video Dave, one day when I actually start to make money with code, I will use that buy me a coffee link!

  • @pranavseth6492
    @pranavseth6492 2 місяці тому

    This is such a nice course Dave. I have started learning Python for my research work and this is by far the best suited for someone like me with a scientific mind but time restriction. Thanks very much. Dr. Pranav Seth

  • @johnaweiss
    @johnaweiss 5 місяців тому

    Fantastic tutes. 7:49 Why doesn't 1980 have quotes around it?

  • @veronicasteluta7001
    @veronicasteluta7001 10 місяців тому +3

    Hi! when I try to print the type of the variable, I get all the time invalid syntax message. No spelling issues, no missing parenthesis. I noticed that the type function doesn't turn red as in your example. I installed all extensions. What can it be? My Python version is 3.9.13

  • @mortezafarhangpanah256
    @mortezafarhangpanah256 Рік тому

    Thanks

  • @TrustATinOwl
    @TrustATinOwl 7 місяців тому

    and it was going so well...

  • @xxFloF000
    @xxFloF000 4 місяці тому

    How do I get the same python syntax color theme in VSCode?

  • @galaxian_wanderer
    @galaxian_wanderer Рік тому

    Dave. I want to ask that whenever you post a new Python video , do you delete the previous files- like hello.py

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому

      You can if you want to. They are all just examples for each lesson right now.

  • @dafiraone
    @dafiraone Рік тому +1

    on 2:49 at line 8, how to merge the '==' to looks like one long '='? is there an extension for it?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому +2

      You can enable font ligatures in your VS Code settings file. I disabled them for future tutorials. I show how here: ua-cam.com/users/shortsf1HVI5slxms

  • @johnaweiss
    @johnaweiss 5 місяців тому

    21:31 What happens if the rjust and ljust fill is longer than the width of your terminal?
    What happens if you leave out the `4` parameter of rjust. In this case, that 4 causes `$1` to fill a length of 4 chars, but won't it fill the remaining space in the terminal width anyway?
    Edit: So i think the 4 means to place the text directly after the preceding text (in this case, "Coffee.........."), rather than right-justify on the entire terminal line. I get it now.

  • @joey_bonesjr3230
    @joey_bonesjr3230 Рік тому

    Hi Dave! I'm loving this tutorial. I came across a problem at 9:05. I cant seem to get the triple quotes to autocomplete. I can do it for the single quotes but when I move out of the single and try to add another it does not autocomplete. Do you have any suggestions?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому

      Not sure why you are not getting auto-completion in VS Code. You might check the setting mentioned in this Stackoverflow answer: stackoverflow.com/questions/45808557/autoclose-single-and-double-quotes-vscode

    • @joey_bonesjr3230
      @joey_bonesjr3230 Рік тому

      @@DaveGrayTeachesCode thanks for the reply. I did check these settings, i also thought it was some plugins but nothing seems to fix this. Its fine its just that i would like to know why i will keep at it. Thanks again

  • @tmt878
    @tmt878 Рік тому

    Please at the end, put all of these Video tutorials into the one. (Attach them all in one video) .
    Like you did for HTML,CSS,JavaScript, ......
    Thanks
    Best regards

  • @dhruvbhandari378
    @dhruvbhandari378 6 місяців тому

    33:13 Which extension?

  • @johnaweiss
    @johnaweiss 5 місяців тому

    27:21 Aren't these equivalent?
    x = False
    x = bool(False)

  • @kdoss5285
    @kdoss5285 Рік тому

    Please make git tutorial continuation

  • @GabrielMartinez-ez9ue
    @GabrielMartinez-ez9ue Рік тому

    Hi Dave, Just for curiosity... weird that you haven't taught Ruby on Rails. For me its like the best Framework out there. Python brings you to django, but if you've used rails -- you'd know its not even remotely the same.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому +1

      Maybe one day. There are so many languages and more. My favorites are JS and Python.

  • @johnaweiss
    @johnaweiss 5 місяців тому

    30:06 Interesting that .real and .imag are properties, not functions. I guess the difference is that functions modify something, properties just tell you something about the thing without modifying it.
    It seems that .real returns the real PART of the variable, and .imag returns the imaginary PART.

  • @martinbrault1563
    @martinbrault1563 Рік тому

    Highlight "First", then "Control and D", then type "Pizza"... Issue is, it also changes all the words "First"' on the file. How can I fix that?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому +1

      Ctrl+D should on select the next instance of the word and not all instances. You can press Alt+Click to deselect any instance you want.

    • @martinbrault1563
      @martinbrault1563 Рік тому

      @@DaveGrayTeachesCode Thank you for your speedy response, and for the solution to the issue

  • @1conscience0dimension
    @1conscience0dimension Рік тому

    10:37 ahaha the js reflex `...`

  • @utinthein7274
    @utinthein7274 Рік тому

    Sir,
    when i type ....
    import math
    don't move to the top in my vscode.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Рік тому

      Did you install the Python extension I discuss in the first lesson of this series? I mention it when I discuss the import moving to the top. VS Code needs to know how to format the Python file.

    • @utinthein7274
      @utinthein7274 Рік тому

      Alright Sir

    • @HEATEDPLA1NS
      @HEATEDPLA1NS 4 місяці тому

      @@DaveGrayTeachesCode I did but it still didn't go up. my version is 3.12.1. any idea how to fix that?

  • @1conscience0dimension
    @1conscience0dimension Рік тому

    oh, first point I can erase my previous comment about creating new file ;)

  • @johnaweiss
    @johnaweiss 5 місяців тому

    7:55 You said you have to cast it as a string to concat in a sentence, but you didn't cast it. You didn't write
    stmt = 'i like ' + str(decade)
    you wrote
    stmt = 'i like ' + decade
    i see now you meant you had to previously cast it, as you did. But it was confusing for a minute!