Python Data Types for Beginners | Python tutorial
Вставка
- Опубліковано 19 лип 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
Dave... I hate math, and you somehow just made it manageable for me. THANK YOU!!!!
just to say thank you very much i am learning python all thanks to your tutorials. Keep up the good work!
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.
Thank you! And hello 👋 to Italy!
Great course Dave, appreciate ur efforet.
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!
Wow, you are amazing Dave. Thank you so much
Thank you!
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
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.
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!
Thank you soo much soo grateful for all the best content you are providing
You're most welcome!
good effort Dave.....your teaching style make me easy to understand your content. Honestly, you are really a good teacher for me.....👍👍👍👍
You're very welcome!
very good. Downloaded your videos so i had to go through them here to give you thumbs up and a comment.
Thanks for another great video!
You're welcome!
It's him again..Thank you so much Dave ❤❤
You're welcome!
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
Glad I could help!
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!
Thank you!
thanks dave
These are exceptionally made videos and i really cannot thank you enough!
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
send me the code, i will test on my machine
nice Dave, can you please guide me how I can set font as did in your vs code ?
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
I will do that.
and it was going so well...
Thanks
Welcome!
Fantastic tutes. 7:49 Why doesn't 1980 have quotes around it?
How do I get the same python syntax color theme in VSCode?
on 2:49 at line 8, how to merge the '==' to looks like one long '='? is there an extension for it?
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
Dave. I want to ask that whenever you post a new Python video , do you delete the previous files- like hello.py
You can if you want to. They are all just examples for each lesson right now.
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?
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
@@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
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.
type(pizza)==str the output i got is plz explain y
27:21 Aren't these equivalent?
x = False
x = bool(False)
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.
Maybe one day. There are so many languages and more. My favorites are JS and Python.
33:13 Which extension?
Please make git tutorial continuation
Will do!
10:37 ahaha the js reflex `...`
The struggle is real!
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?
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.
@@DaveGrayTeachesCode Thank you for your speedy response, and for the solution to the issue
Sir,
when i type ....
import math
don't move to the top in my vscode.
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.
Alright Sir
@@DaveGrayTeachesCode I did but it still didn't go up. my version is 3.12.1. any idea how to fix that?
Ctrl + / is not working
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.
oh, first point I can erase my previous comment about creating new file ;)
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!