Python 3 Tutorial: Print Function and Strings

///Python 3 Tutorial: Print Function and Strings

Python 3 Tutorial: Print Function and Strings

FavoriteLoadingAdd to favorites

The print function in Python is a function that outputs to your console window whatever you say you want to print out. At first blush, it might appear that the print function is rather useless for programming, but it is actually one of the most widely used functions in all of python. The reason for this is that it makes for a great debugging tool. If something isn’t acting right, you can use the print function to print out what is happening in the program. Many times, you expect a certain variable to be one thing, but you cannot see what the program sees. If you print out the variable, you might see that what you thought was, was not.

Next up, strings, what are they? Strings are just “strings” of text, hence the name. Strings are a type of data. Another type of data is integers.

Python 3 Programming tutorial Playlist:

Sample code for this basics series:

Welcome to another Python 3.3 tutorial video, this video covers the basic print function in python 3 as well as basic string rules and usage.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6

By |2017-05-06T19:52:33+00:00May 6th, 2017|Python Video Tutorials|50 Comments


  1. Bryce Ruffin May 6, 2017 at 7:54 pm - Reply

    everything is hunky-dory python is not angry
    8:24 ha!

  2. Paritosh Ghimire May 6, 2017 at 7:54 pm - Reply

    python gave hi 5 😀

  3. Artur Müller May 6, 2017 at 7:55 pm - Reply

    Thank you Sir, you are fixing the damage my teacher has done to me.

  4. e r May 6, 2017 at 7:56 pm - Reply

    6:23 lol

  5. S.jamjam May 6, 2017 at 7:56 pm - Reply

    you should cover data types before covering converting fore beginners. however you are doing great! thank you so much

  6. james88 May 6, 2017 at 7:57 pm - Reply

    Rest stuff buy what is int and float

  7. SAMAPAN BHADURY May 6, 2017 at 7:59 pm - Reply

    i am not getting python 64 bit from the website and i am confused about the editor u r using. my idle editor is debugging instantaneously unlike u. i can’t seem to find run option. do i have to install both python 2 and 3? if yes, then is there any order i need to maintain?

  8. HW Apollo May 6, 2017 at 8:05 pm - Reply

    Very good job. This provides immense value for the world. Keep up the good work!

  9. Martín Varela May 6, 2017 at 8:05 pm - Reply

    I know this tutorial is really old, but… Do you have idea how much I love when there is not 90% of video image wasted on pure background images, small windows, lots of border-stuff, and tiny-tiny text underscaled from 1080 to 720p??

    Finally something I can start without headache an hour later.

  10. Timothy Nichols May 6, 2017 at 8:06 pm - Reply

    Great Video. I am currently just getting started with Python in college and have found your videos to be the most resourceful.

  11. MegaKorespond May 6, 2017 at 8:06 pm - Reply

    my school is making us watch this video because its detailed

  12. Pablo Ramos May 6, 2017 at 8:07 pm - Reply


  13. Inativo May 6, 2017 at 8:12 pm - Reply

    Hi +sentdex , first of all, congratulation for the excellent work! you could activate the "Add Captions / CC" ? with this people can contribute to the automatic caption made by youtube algorithm. I am Brazilian, and use a lot CC on videos, and not always the legend is consistent with what was said. By doing so, you can reach a wider audience, since the subtitles to your videos say exactly what you said, and besides, other users can contribute / correct subtitles.
    Thak you, nice job!

  14. Matthew James May 6, 2017 at 8:12 pm - Reply

    Hello! Thanks for the video. I’ve opened up the IDLE text editor and typed in import matplotlib.pyplot as plt but it comes up with an error saying No module named ‘matplotlib’. I think I installed python twice (whoops) one with Anaconda and one directly from the website. Any ideas on what I can do ? Thanks you thank you thank you 🙂

  15. Crystal axe21 May 6, 2017 at 8:13 pm - Reply

    Helpful, Thanks

  16. Meghdeep Biswas May 6, 2017 at 8:14 pm - Reply

    "High" 😀

  17. dmftradutor May 6, 2017 at 8:14 pm - Reply

    Thanks for your classes!

  18. Imran Sarwar May 6, 2017 at 8:14 pm - Reply

    sir What Editor you use????

  19. StoneMan a May 6, 2017 at 8:14 pm - Reply

    Excuse me,which is the  keyboard shortcuts that makes the program run in the same python shell? The python shell always tells me  RESTART.

  20. Tru Synn II May 6, 2017 at 8:18 pm - Reply

    could you make money off of this??

  21. Samuel May 6, 2017 at 8:19 pm - Reply

    Very helpful! Thank you man. I needed some beginner tutorials as I just started my computing course at school and am a complete beginner but very keen! You explain very well, you’ve earned a sub! 🙂

  22. james88 May 6, 2017 at 8:19 pm - Reply

    The difficulty level was raises after the 10-11 or so very much

  23. xD May 6, 2017 at 8:20 pm - Reply

    you explain very well man!

  24. F. Mehmet Aytekin May 6, 2017 at 8:23 pm - Reply

    Explanations are very clear and understandable. Thx

  25. Elnaz Shirazi May 6, 2017 at 8:23 pm - Reply

    one of the best tutorials so far; thanks a hip

  26. Louis Willcock May 6, 2017 at 8:27 pm - Reply

    The intro sound that you use at the start of your videos, is it similar to Phantom Terrains?

  27. Eduardo Branco May 6, 2017 at 8:29 pm - Reply

    Can i use PyCharm to do your video tutorials?

  28. aqarooni02 May 6, 2017 at 8:30 pm - Reply

    I kinda have OCD too

  29. Morally Ambiguous May 6, 2017 at 8:33 pm - Reply

    for a beginner…… absolutely useless at around @4:45. there needs to be MUCH more explanation of exactly WHAT it is you’re talking about… there is ZERO reference whatsoever. Honestly if you’re a true beginner to Python or coding for that matter i would highly recommend doing some research into the best courses/books for that task 😉 This line of tutorials might be good for someone who knows a LITTLE bit about what Python is fundamentally as well as how it’s implemented …. but even then it’s still only good for the "noob programmer" that maybe needs some freshening up 😀 There are better books written about learning python for the absolute beginner to programming for a reason i guess 😛

  30. TheThingsInside MyHead May 6, 2017 at 8:35 pm - Reply

    I’m getting red error messages for everything after 6:20 and its starting to frustrate me.

  31. Courtney Girgin May 6, 2017 at 8:38 pm - Reply

    how to open the application like you did. I went through my cdrive folder but the application is opening up with a black page

  32. Taha Moin May 6, 2017 at 8:38 pm - Reply

    Thank you a lot Sir for increasing my knowledge. Prayers with you 🙂

  33. Joelizzl May 6, 2017 at 8:38 pm - Reply

    I’m on a mac, and F5 to run code doesnt work for me. What is my option to run the code like you are?

  34. Joe Cornor May 6, 2017 at 8:39 pm - Reply

    Your the man!

  35. Rodney Ramsay May 6, 2017 at 8:41 pm - Reply

    i learned pyhton 2 but im trying to go through your machine learning tutorials so you convinced me to switch to python 3! lol

  36. Ashish Mansur Husain May 6, 2017 at 8:41 pm - Reply

    You my friend are Bucky version 2.0… Love your tutorials..

  37. geek2core May 6, 2017 at 8:42 pm - Reply

    I downloaded and installed Python 3.5.2. Tried to do what you are doing but dont see the ‘Run’ in the menubar. What should I do?

  38. yxhankun May 6, 2017 at 8:42 pm - Reply

    can you show me how to print a character in the bottom line say line 24 and position 5?

  39. Esther Esther May 6, 2017 at 8:43 pm - Reply

    These videos are great… they make me learn, they make me laugh… Keep up the good work! Thanks for making these!

    One question – are you running this using the IDLE? Your screen looks a bit different than mine, i’m in the IDLE for Python 3.4.3. Shell.


  40. ubvids May 6, 2017 at 8:43 pm - Reply

    Excellent! Ty

  41. Fruggstrix May 6, 2017 at 8:44 pm - Reply

    Why didnt you type hello world? o-o

  42. james88 May 6, 2017 at 8:47 pm - Reply

    I tried codeacademy but can’t even do that. Do you have some more basic tutorials like a small basic program with Print and if elif or and some other to make the simplest program

  43. Hany El-Ghaish May 6, 2017 at 8:47 pm - Reply

    Hi sentdex,’

    I have simple problem but I can not solve hope you help me:
    to consider backslash we can add r
    by this way path =r"D:HanyBodyfile.csv"
    My problem:
    I read a string called path then pass it to a function that takes path as an argument

    I do not know how to add r to the path
    to be like new_path=r path (I mean the string value in the path variable)

  44. MakeMeCry5 - cScorpio May 6, 2017 at 8:47 pm - Reply

    i am creating a calculator to get used to variables and ints and strings, but i do not know how to set variables as intergers,

  45. TechLord79 May 6, 2017 at 8:48 pm - Reply

    What I missed are format strings and the new goodies Python 3 brings.

  46. ezeegupta May 6, 2017 at 8:49 pm - Reply

    Is this series will be enough or should I get some book also to make switch, given that I am an experienced programmer in C, Shell with knowledge of C++ and Java

  47. Freddy Bagel May 6, 2017 at 8:49 pm - Reply

    So a string is text, an integer is a whole number and a float is a number with decimal?

  48. Leonard Dobbin May 6, 2017 at 8:50 pm - Reply

    Thanks for this, I need to learn Python as part of my computing work at school and this tutorial really helps!

  49. eathenbad May 6, 2017 at 8:50 pm - Reply

    okay seriously, what does that ‘print()’ function do? debug? I did it on my Python and I didn’t see anything happening. wha’ts the purpose of that ‘print’ function?

  50. Yosh ua May 6, 2017 at 8:50 pm - Reply

    "If you reallly want to have a hi 5 in there"
    yup, thats me lol

Leave A Comment